Answers for "how to check if the input is num in python"

1

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")
Posted by: Guest on July-15-2021

Code answers related to "how to check if the input is num in python"

Python Answers by Framework

Browse Popular Code Answers by Language