Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python check if string is int

str = input("Enter any value: ")
 
if str.isdigit():
    print("User input is an Integer ")
else:
    print("User input is string ")
Source by www.pythonpool.com #
 
PREVIOUS NEXT
Tagged: #python #check #string #int
ADD COMMENT
Topic
Name
8+3 =