内置函数_exit

描述

exit函数的作用:结束程序、并且可以指定结束码退出程序

示例代码:

print('hello')
print('world')
exit(100)  # 程序执行到这行结束,并返回结束码为100
print('python')
print('c++')
View Code

运行结果:

原文地址:https://www.cnblogs.com/yujiemeigui/p/14611351.html