enteros = 32
flotantes = 44.0
complejos = 43. + 1j
cadena = "hola mundo"
lista_enteros = [1,2,3,4,5]
lista_rara = [1,2,3,4,5,"seis"]
lista_flotantes = [1.,2.,3.,4.,5.]
tupla_enteros = (1,2,3,4,5)type(enteros + enteros)int
type(enteros + flotantes)float
type(enteros/2)float
complejos + enteros + flotantes(119+1j)
cadena + enteros --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[15], line 1 ----> 1 cadena + enteros TypeError: can only concatenate str (not "int") to str
lista_enteros + enteros--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[16], line 1 ----> 1 lista_enteros + enteros TypeError: can only concatenate list (not "int") to list
cadena * enteros'hola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundohola mundo'
cadena / enteros--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[18], line 1 ----> 1 cadena / enteros TypeError: unsupported operand type(s) for /: 'str' and 'int'
cadena + lista_enteros--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[19], line 1 ----> 1 cadena + lista_enteros TypeError: can only concatenate str (not "list") to str
lista_enteros + lista_enteros[1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
lista_enteros + lista_flotantes[1, 2, 3, 4, 5, 1.0, 2.0, 3.0, 4.0, 5.0]
lista_enteros + lista_flotantes + lista_rara[1, 2, 3, 4, 5, 1.0, 2.0, 3.0, 4.0, 5.0, 1, 2, 3, 4, 5, 'seis']