Python入门.异常处理

try:
    a=1/0  #除数不能是零
    print a
except:
    print 'Arithmetic exception'

猜你喜欢

转载自8850702.iteye.com/blog/2279210