摘要: 1.使用try...except捕捉异常 try: s=1/0 except IndexError: print ('except') except KeyError: print ('Keyerror') except ZeroDivisionError: print ('ZeroDivision 阅读全文