how to get the number of the string in pyuthon code example
Example: how to get a number from a string in python
string = "I am 14 years old"
for i in string.split():
if i.isdigit():
print(i)
print()
string = "I am 14 years old"
for i in string.split():
if i.isdigit():
print(i)
print()