Search code examples
python-3.xprintingprompt

What does the prompt '...' in python 3 mean?


As an exercise we need to explain what happens when we leave an open paranthesesis in a print statement.

Doing so does not give us an error nor a value, the resulting line gives us a prompt consisting of dots instead of arrows. Does this situation/prompt have a name and can someone explain?

for example:

>>>print('Hello'

...

Solution

  • The official name is secondary prompt. It is used when inputting incomplete constructs, for example not closing any set of parentheses or when defining a function.