[Tutor] Get confused by ... and >>>
Kent Johnson
kent_johnson at skillsoft.com
Mon Sep 6 17:04:54 CEST 2004
>>> and ... are prompts written by the python interpreter when you run it
from the command line. You shouldn't type them in yourself. >>> is the
prompt used when the interpreter is expecting a new statement. ... is the
'secondary' prompt used when you have typed something incomplete and the
interpreter is expecting something more.
Using your previous example,
>>> # This is a comment
... 2+2
4
what you type is
# This is a comment<enter>
2+2<enter>
The interpreter types the >>>, ... and 4
Note if you are using an IDLE shell window you will see the >>> but not the ...
Kent
At 02:57 PM 9/6/2004 +0100, W X Liu wrote:
>Hello guys,
>
>I am learning python now, and I get confused by ... and >>>, who can give me
>some clues or examples in what situation the ... or >>> should be use.
>
>Regards
>
>Wenxin Liu
>
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list