split long string in two code lines
Terry Reedy
tjreedy at udel.edu
Mon Jun 13 23:55:31 EDT 2011
More information about the Python-list mailing list
Mon Jun 13 23:55:31 EDT 2011
- Previous message (by thread): split long string in two code lines
- Next message (by thread): split long string in two code lines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/13/2011 5:51 PM, darnold wrote:
> print "this" \
> " is" \
> " a" \
> " test" \
> this is a test
>>> print('this'
' is'
' a'
' test')
this is a test
Python ignores \n within parentheses, brackets, and braces, so no
fragile trailing backslash needed. ('Fragile', because invisible space
or tab after '\' is an error.)
--
Terry Jan Reedy
- Previous message (by thread): split long string in two code lines
- Next message (by thread): split long string in two code lines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list