For python beginners, the differences between lists and tuples might not be as clear as to those who already got some experience using them.

python

Let’s review the key differences between the two. hopefully it will help you choose the right type in your code and understand that although this post called ‘lists vs. tuples’ there is no real match here. each type has his own use case.

Mutability

Mutability talks about the capability of object to change or alter. This is one of noticeable difference between the two types.

First, let’s use list:

Now let’s try the same on tuple:

Continue reading