>>); when entering consecutive lines, it will display the "secondary prompt", which is the default It's three points (...). When entering the interpreter, it will first display the welcome message, version information, copyright statement, and then a prompt will appear."/> >>); when entering consecutive lines, it will display the "secondary prompt", which is the default It's three points (...). When entering the interpreter, it will first display the welcome message, version information, copyright statement, and then a prompt will appear.">

Home  >  Article  >  Backend Development  >  What is the prompt of the python interpreter?

What is the prompt of the python interpreter?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-06-26 15:38:2718344browse

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:

What is the prompt of the python interpreter?

$ 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn