📅  最后修改于: 2022-03-11 14:45:44.272000             🧑  作者: Mango
whatever = input("Pick an integer > ")
try:
whatever_as_an_integer = int(whatever)
print("That was an integer.")
except ValueError:
print("That is not an integer.")