On Mon, Jun 24, 2013 at 9:58 PM, Dave Angel <da...@davea.name> wrote: > > Alternatively, you can also use the statement continuation mechanism, > whereby the last character of the line is a backslash. Using that approach > you can break almost anywhere, except within a token or inside a string > literal.
Also, the next character after a line continuation has to be a newline, e.g. no spaces, tabs, or comments. Your editor should have a feature to remove trailing white space on each line. >>> a = 'this' \ File "<stdin>", line 1 a = 'this' \ ^ SyntaxError: unexpected character after line continuation character >>> a = ('this' # this way ... ' string' ' is long') # is more flexible >>> a 'this string is long' _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor