+ 2
Different methods for copying a list:
https://code.sololearn.com/cvlGwbcjQXOO/?ref=app
I think list.copy() does the work best. It is just a slighty faster than list[:], but explains better about what is being done.
Tuples don't have the copy method and thus tuple.copy() would result in errors, but you can use the slicing tuple[:].
Dictionaries and sets have a copy method, but they can't be sliced.
If you have a program where you will propably need to copy different types of iterables you can't use any of the previous methods alone, but you can do this with copy method from copy module:
import copy
copy.copy(tuple)
copy.copy(list)
copy.copy(dict)
Copy module also has a deepcopy method, which can be used, when an iterable possibly contains other iterables, which you also want to copy:
copy.deepcopy(list)



