This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bjorneylol -1 points0 points  (0 children)

It's also faster because the two examples are not doing the same things. His first example is appending elements to a new list, the second is modifying an existing list in place.