方法一:

import sys

sys.exit()  # 退出当前程序,但不重启shell

方法二:

exit()  # 退出当前程序,并重启shell

 

方法三:

quit()  # 与exit()效果一样,退出并重启shell
posted on 2020-03-24 23:30  jaysonteng  阅读(7047)  评论(0编辑  收藏  举报