Code 61: Check if a string contains only numbers | isnumeric() in Python | 365 Days of Code

Опубликовано: 20 Октябрь 2024
на канале: Code House
569
4

Python code to check if a string contains only numbers.
string1 = "8000"
string2 = "a432kk"
print(string1.isnumeric()) # True
print(string2.isnumeric()) # False