# coding:utf-8
age_str = raw_input('Input your age: ')
try:
age = int(age_str)
print age
except:
print '输入的不是整数'
Python学习 - 异常 - 基础
最新推荐文章于 2024-09-16 08:30:43 发布
# coding:utf-8
age_str = raw_input('Input your age: ')
try:
age = int(age_str)
print age
except:
print '输入的不是整数'