Line Structure

Python statements are delimited by newlines

     print a+3
     b = 4*x

Line continuation (\) can be used for long statements

     a = math.cos(3*(x-n)) + \
         math.sin(3*(y-n)) 

Triple-quoted strings, lists, tuples, and dictionaries can span multiple lines

     a = [ 4,
           5 ]
     b = { 'x': 10,
           'y': 20 }
     c = foo(x,y,z,
             w,v) 

Short statements can be separated by a semicolon (;)

     a = 3; b = 10*x; print b
<<< O'Reilly OSCON 2000, Introduction to Python, Slide 26
July 17, 2000, beazley@cs.uchicago.edu
>>>