📅  最后修改于: 2022-03-11 14:45:27.507000             🧑  作者: Mango
代码示例6
age = input('age:')
try:
new_age = int(age)
except ValueError: # if age is not convertable to int
print('please enter a number...')