從 Python 命令列退出

Vaibhav Vaibhav 2022年5月17日
從 Python 命令列退出

Python 直譯器可以通過鍵入 python 從任何命令列啟用。一旦啟用,它就可以用來編寫程式碼並執行它。一旦直譯器啟動,除非我們退出 Python 直譯器,否則不能使用通常的命令列實用程式。有幾種方法可以退出 Python 直譯器。這篇文章討論了它們。

退出 Python 直譯器的方法

以下是退出 Python 直譯器的方法。

  1. 輸入 exit():注意是 exit() 而不是 exit。這是一個函式呼叫。
  2. 在 Windows 上,使用組合鍵 Ctrl + Z + Enter
  3. 在 UNIX 系統上,使用組合鍵 Ctrl + D
Vaibhav Vaibhav avatar Vaibhav Vaibhav avatar

Vaibhav is an artificial intelligence and cloud computing stan. He likes to build end-to-end full-stack web and mobile applications. Besides computer science and technology, he loves playing cricket and badminton, going on bike rides, and doodling.

LinkedIn GitHub