Tuplas

>>> tupla = (100, "Hola", [1,2,3], -50)
>>> tupla
(100, 'Hola', [1, 2, 3], -50)
>>>
>>> #Indice y Slicing
>>> tupla[0]
100
>>>
>>> tupla[-1]
-50
>>>
>>> tupla[:2]
(100, 'Hola')
>>>
>>> tupla[2][-1]
3
>>>
>>> #Las tuplas son inmutable
>>>
>>> tupla[0] = 50
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>>
>>> #Cantidad de elementos
>>> len(tupla)
4
>>> len(tupla[2])
3
>>>
>>> #Métodos de las tuplas
>>> tupla.index(100)
0
>>> tupla.index("Hola")
1
>>>
>>> numeros = (10, 10, 10, 50, 10)
4
>>> exit()