Python list slice syntax used for no obvious reason
- by Charles Anderson
I occasionally see the list slice syntax used in Python code like this:
newList = oldList[:]
Surely this is just the same as:
newList = oldList
Or am I missing something?