• 技术文章 >常见问题 >Python常见问题

    cmd中怎么退出python程序

    silencementsilencement2019-11-12 14:50:46原创6194

    命令行是我们常用的工具,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学习网,大量的免费python学习视频,欢迎在线学习!

    专题推荐:cmd
    品易云
    上一篇:python中如何取整 下一篇:如何使用python自带的idle

    相关文章推荐

    • cmd中为什么无法执行python脚本• cmd怎么执行python• python中cmd是什么• 如何在cmd窗口运行python程序

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网