摘要: 一、异常处理 1、定义:程序遇到了可预见的问题,但是不想让用户看到出错信息,并且对这种错误进行处理,同时程序不会奔溃,加强程序的健壮性。 try: name = [] print(name[1]) except IndexError as e: print(e) except Exception a 阅读全文
posted @ 2020-05-07 08:59 卡吧不死机 阅读(271) 评论(0) 推荐(1) 编辑