Invoking the Interpreter Interactive Mode

Source: Internet
Author: User

When you type Python directly on the command line, after the command is read by the terminal (TTY), after entering its prompt, the interpreter first prints a welcome message (Welcome message) explaining (stating) its version number and copyright information, Then print out the interpreter's prompt, then the Python interpreter is in interactive mode. In this mode, it prompts for a prompt to type the next command, typically using three greater than sign (three Greater-than signs) ">>>". If you need to continue (continuation) input from the second line, the second line of the prompt will default to three dots "...".

Pythonpython 2.7 (#1, Feb, 00:02:06) Type ' help ', ' copyright ', ' credits ' or ' license ' for more information.>> >

The continuation line (continuation lines) is useful in certain situations, such as when you want to enter a block structure with multiple lines of code. As the following example, we enter an "if" statement block:

>>> The_world_is_flat = 1>>> if The_world_is_flat: ... print "Be careful not to fall off!" ... Be careful not to fall off!


Invoking the Interpreter Interactive Mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.