您的当前位置:首页正文

cmd中怎么退出python

2024-08-01 来源:知网教育

命令行是我们常用的工具,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>

更多学习内容,请点击。