You can use Python on your computer in two ways — using the Python console, or by writing a Python program and running it. Let's discuss these one by one.
To start playing with Python, open up the command line on your computer. You should already know how to do that – you learned it in the Introduction to the Command-line Interface chapter.
Once you're ready, follow the instructions below.
We want to open up a Python console, so type in python on Windows or python3 on Mac OS/Linux and hit enter.
$ python3Python 3.6.1 (...)Type "help", "copyright", "credits" or "license" for more information.>>>
After running the Python command, the prompt changed to >>>. For us this means that for now we may only use commands in the Python language. You don't have to type in >>> – Python will do that for you.
If you want to exit the Python console at any point, just type exit() or use the shortcut Ctrl + Z for Windows and Ctrl + D for Mac/Linux. Then you won't see >>> any longer.