Built-in Data Structures: Tuples
Commas are used to define tuples
- Parentheses around tuples are optional
- E.g.
>>> 1,('2',2.0)
(1, ('2', 2.0))
>>> (1,('2',2.0))
(1, ('2', 2.0))
- The one-element list requires a trailing comma
>>> 1,
(1,)
>>> (1) _ This is not a tuple but a number
1