#! /usr/bin/python
s=input("Input your age:")
if s =="":
raise Exception("Input must no be empty.")
try:
i=int(s)
except Exception as err:
print(err)
finally: # Clean up action
print("Goodbye!")
python实例 异常处理
猜你喜欢
转载自www.cnblogs.com/fanweisheng/p/11243870.html
今日推荐
周排行