1
I have a list in Python and I need to know if it has any words or letters, because I need it to only have numbers
def sum_of_products(lista):
if type(lista) != int:
print("Possui letras")
else:
print("Somente Numeros")
I thought of something like this, but I can’t find the solution.
And if you own the string
'42'
, which is a string numerical, what must happen?– Woss
He would have to refuse and understand as if it were a word
– O.PJ