Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check if an input is a number in python

user_input = input("Enter Something:")

if user_input.isnumeric():
  print("Is a number")
else:
  print("Is not a number")
 
PREVIOUS NEXT
Tagged: #check #input #number #python
ADD COMMENT
Topic
Name
7+1 =