When entering and executing instructions on the terminal (tty), we say that the interpreter is running in interactive mode. In this mode, it will display the "primary prompt" to prompt for the next command, usually represented by three greater-than signs (>>>); when entering consecutive lines, it will display "Secondary prompt", the default is three dots (...). When entering the interpreter, it will first display the welcome message, version information, and copyright statement, and then the prompt will appear:
$ python3.7 Python 3.7 (default, Sep 16 2015, 09:25:04) [GCC 4.8.2] on linuxType "help", "copyright", "credits" or "license" for more information. >>>
Related recommendations: "Python Video Tutorial》
Multi-line instructions need to be entered in multiple consecutive lines. For example, take if as an example:
>>> the_world_is_flat = True >>> if the_world_is_flat: ... print("Be careful not to fall off!") ... Be careful not to fall off!
The above is the detailed content of What is the prompt of the python interpreter?. For more information, please follow other related articles on the PHP Chinese website!