How do you denote the start of a new line in the Python interpreter?

QuestionsQuestions4 SkillsProPython Control StructuresAug, 01 2025
0166

In the Python interpreter, the start of a new line is indicated by the >>> prompt. If you are continuing a statement, such as an indented block or a continuation of a previous line, the prompt changes to .... You do not type these prompts; they are automatically displayed by the interpreter.

For example:

>>> print("Hello, World!")
Hello, World!

If you were to continue a statement, it would look like this:

>>> if True:
...     print("This is a continuation.")
...
This is a continuation.

0 Comments

no data
Be the first to share your comment!