how do i check if an input from a user is an int python code example
Example: how to say that an input needs to be a number python
try:
val = int(userInput)
except ValueError:
print("That's not an int!")
try:
val = int(userInput)
except ValueError:
print("That's not an int!")