Tuples
Explore 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, ()
—unlike lists that use []
. They are also ordered and, hence, follow the linear index notation.
Access this course and 1400+ top-rated courses and projects.