Next: Comments Up: Lexical analysis Previous: Lexical analysis

Line structure

A Python program is divided in a number of logical lines. The end of a logical line is represented by the token NEWLINE. Statements cannot cross logical line boundaries except where NEWLINE is allowed by the syntax (e.g. between statements in compound statements).



guido@cwi.nl