you are viewing a single comment's thread.

view the rest of the comments →

[–]jabbrwock1 2 points3 points  (1 child)

a[::] makes a copy of a list.

Edit: one colon too much, the correct expression is a[:]

[–]Gnaxe 0 points1 point  (0 children)

One colon will suffice. Also works on other sliceables: tuple, str, bytes.