Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to know if a string is an integer in python

#The isnumeric function can be used to determine a string is an integer or not!
#for example!
s = '5651'
if s.isnumeric():
   print('True')
else:
   print('False')
#i hope i helped you!
#Sorry for bad english!
Source by www.pythonpool.com #
 
PREVIOUS NEXT
Tagged: #string #integer #python
ADD COMMENT
Topic
Name
3+5 =