Tuples: No Deletion and Length
No deletion!
- Tuples are immutable (cannot be changed)
Length:
- Syntax: len(tuple)
- E.g.
>>> t = (1,2,(3,4,5))
>>> len(t)
3
>>> len(t[1])
Traceback (most recent call last):
File "", line 1, in ?
len(t[1])
TypeError: len() of unsized object
>>> len(t[2])
3