2019-04-18
阅读量:
527
python异常错误列表
异常错误列表:
- IOError:如果无法打开文件
- KeyboardInterrupt:当用户按下不需要的键时
- ValueError:当内置函数收到错误的参数时
- EOFError:如果在没有读取任何数据的情况下命中文件结尾
- ImportError:如果找不到模块
except ZeroDivisionError:
print("Sorry ! You are dividing by zero ")
# Look at parameters and note the working of Program
divide(3, 0)
输出:
Sorry ! You are dividing by zero






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论