The standard Python interpreter is already fairly powerful, but more options are available through customization. First, let’s start with a 'Hello world!'
. Because the interpreter uses REPL, all output will be automatically printed and we can simply create a string.
Sometimes interactive interpreters are referred to as REPL. This stands for Read-Eval-Print-Loop. This effectively means that all of your statements will be executed and printed to your screen immediately.
First, we need to start the interpreter; after that, we can type our commands:
$ python3
Python 3.9.0
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'Hello world!'
'Hello world!'
That was easy enough. And note that we didn’t have to use print('Hello world!')
to show the output.
Many interpreters have only...