DEV Community

Discussion on: 71 Python Code Snippets for Everyday Problems

Collapse
 
leahein profile image
Leah Einhorn

Nifty list!

Another way to clone a list:

my_duplicate_list = [*my_list]
Collapse
 
renegadecoder94 profile image
Jeremy Grifski

Oh, this is cool! I can't believe there are even more slick ways to copy a list. Do you mind if I include this in the original article with credit to you for the tip?

Collapse
 
leahein profile image
Leah Einhorn

Absolutely, happy to contribute :)

Thread Thread
 
renegadecoder94 profile image
Jeremy Grifski

Just updated the article to include your solution. Did you know this solution is blazing fast?!