首页 > IT职业 > IT职场 > cmd中怎么退出python程序

命令行是我们常用的工具,cmd中如何退出Python?来看一下下面的内容
(1)在命令行上输入exit() (2)在命令行上输入quit()
还有一种方法是在命令行上输入Ctrl+Z,再按回车。
如下实例
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("cmd怎么退出python?")
cmd怎么退出python?
>>> exit()
C:Administrator>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3330/viewspace-2835814/ ,如需转载,请注明出处,否则将追究法律责任。