compound types ()-tuple []-list {}-dictionary
4.6. Sequence Types — list, tuple, range
4.9. Set Types — set, frozenset
range(0, 9)
range(1, 10)
range(1, 11)
range(10, 20, 2)
range(5.2, 6, 0.3)
list(range(10)) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
tuple(range(10)) (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
list
[1, "two", 3.14]
tuple
(1, 2, 3)
range
range(10)
set
{1, 2, 3}
dict
{'a':1, 'b':2, 'c':3}
vo: ordered collection ≡ sequence
data = [{'nome':'Roberto', 'cgn':'Occa', 'YOB':1954}, {'nome':'Mario', 'cgn':'Occa', 'YOB':1920}, {'nome':'Annita', 'cgn':'Gaffo', 'YOB':1912}]
Strings, String Type.
tryng to mutate it, result in
TypeError: 'tuple' object does not support item assignment
AttributeError: 'tuple' object has no attribute 'append
faq/Why are there separate tuple and list data types?