Es dígito?
Nuevo tipUn método muy interesante en los strings es el método isdigit. Este método nos permite conocer si un string es o no un número.
>>> '123'.isdigit()
True
>>> 'Hola'.isdigit()
False
Un método muy interesante en los strings es el método isdigit. Este método nos permite conocer si un string es o no un número.
>>> '123'.isdigit()
True
>>> 'Hola'.isdigit()
False