摘要: 1. try....except(except1,except2),可以捕获多个异常,如果都未捕获到,则程序终止 try: a=[1,2,3] print(a[4]) except(IndexError, ZeroDivisionError): print('发生了错误') print('1111' 阅读全文
posted @ 2021-01-15 20:38 maxwell11 阅读(122) 评论(0) 推荐(0) 编辑