如何在 Windows 10 命令提示符下退出 Python?

How to get out of Python in Windows 10 command prompt?

我是使用命令提示符的新手,我刚刚在命令提示符下执行了第一行代码,如下所示:

C:\Users\Michael>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello world")
hello world

我现在如何“退出”Python,以便我可以 运行 其他命令,例如 cdcpls , ETC。?我知道我可以关闭并打开一个新的命令提示符 window,但是是否有相应的命令?

只需 运行 exit() 即可关闭 window。

先生,您可以键入 exit()Ctrl+Z 并单击 Enter。