'How can i exit the python shell to the terminal in Pycharm?

For example, I wrote the code;

SyntaxError: invalid syntax
>>> python manage.py command
  File "<console>", line 1

python manage.py command* to get to the shell now I can't return back to the command line in Pycharm



Solution 1:[1]

There are two ways to return to the terminal

  1. exit()
  2. ctr + D

Solution 2:[2]

Use Ctrl-Z plus Enter .... OR.... quit()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 danish_wani
Solution 2 Husam Alhwadi