Terminal

What is a terminal?

A terminal is a program that allows you to interact with the OS, and it's often referred to as the command line or console. You use a terminal (rather than going through a GUI) to issue concise, clear, text-based commands to the OS to quickly perform tasks.

How do you run a Python program from a terminal?

You can run a Python program from a terminal using a command like this:

$ python hello_world.py

How do you start a Python session from a terminal?

You can also start a Python session in a terminal. In a Python terminal session, each line of code executs as soon as you enter it:

$ python

>>> print("Hello, terminal world!")

Hello, terminal world!