Cómo obtener un número de una cadena en Python
string = "I am 14 years old"
for i in string.split():
if i.isdigit():
print(i)
print()
Tired Toucan
string = "I am 14 years old"
for i in string.split():
if i.isdigit():
print(i)
print()