Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check whether input is string or not

num = input("Enter your number ")

print("
")
if num.isdigit():
    print("User input is Number ")
else:
    print("User input is string ")
Source by pynative.com #
 
PREVIOUS NEXT
Tagged: #check #input #string
ADD COMMENT
Topic
Name
6+9 =