[Tutor] Multi-line statements with comments

Kirby Urner urnerk@qwest.net
Sat, 29 Dec 2001 07:51:50 -0800

I just realized that, even simpler than joining a string split 
into a list of substrings, in order to comment each part,
is to take advantage of the syntax which concatenates 
strings if they simply appear in sequence e.g. 
"hello " "world" becomes "hello world".  

Combine this feature with the grouping characters (  ), which 
give you multilines without use of \, and you've got a way to 
comment a multi-line string sans use of join():

 >>> mystr  =  ("the"      # another way to comment
                " "        # a multiline string
                "end")     # check it out!
 >>> mystr
 'the end'