Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to check if string contains only numbers

print("012345".isdecimal())
OUTPUT
True
print("a12345".isdecimal())
OUTPUT
False
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #python #check #string #numbers
ADD COMMENT
Topic
Name
5+4 =