Tuples
This lesson highlights the key features of the tuple data structure in Python.
We'll cover the following
Structure #
A tuple is very similar to a list, except for the fact that its contents cannot be changed. In other words, a tuple is immutable. However, it can contain mutable elements like a list. These elements can be altered.
The contents of a tuple are enclosed in parentheses, ()
. They are also ordered, and hence, follow the linear index notation.
Get hands-on with 1200+ tech skills courses.