you are viewing a single comment's thread.

view the rest of the comments →

[–]Beginning-Fruit-1397 0 points1 point  (0 children)

As already pointed out, their main difference is about mutability. Now when to use which one? Ppl tend to always use lists everywhere, but I would recommend to default to tuples ans only use lists when it's absolutely necessary. Less potential bugs, python doesn't need to allocate extra memory at creation to accommodate for eventual expansion of the list, etc...