0

I'm brand new to using the command prompt, and I've just executed my first line of code from the command prompt as follows:

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

How do I now "get out" of Python so that I can run other commands, such as cd, cp, ls, etc.? I know I can just close and open a new command prompt window, but is there a command for this instead?

Leonidas
  • 613
  • 1
  • 6
  • 23

2 Answers2

1

Simply running exit() will close the window.

hidden
  • 38
  • 5
1

Sir, You can type exit() or Ctrl+Z and click on Enter.