Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Recap0:53 with Ashley Boucher
Recapping Python lists.
As a recap,
a Python list is a way to store many pieces of data in one container.
What kind of data?
You can store any type of Python object in a list, including integers, strings, and
even other lists.
Tuples offer the same functionality with a slightly different syntax.
So what's the point?
Why have a tuple when you also have lists?
There are some semantic differences, but the main difference is in mutability.
Lists are not static.
We can add elements to them and remove elements from them.
This means lists are mutable.
In other words, lists can be changed in place.
Tuples, however, are the opposite.
They're immutable, they cannot be changed.
Elements cannot be added, removed, or reordered.
Mutability has different advantages and disadvantages.
One is not better than the other.
They just have different use cases.
You need to sign up for Treehouse in order to download course files.Sign up