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>

云海天教程网,大量的免费python学习资料,欢迎在线学习!

来源:PY学习网:原文地址:https://www.py.cn/article.html

hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » cmd中怎么退出python程序