Hot to split string literals that will across two or more lines ?
rurpy at yahoo.com
rurpy at yahoo.com
Thu Nov 17 22:31:48 EST 2005
You can leave out the "+" if you want, adjacent strings are
automatically
concatenated.
print "a string which is very loooooo" \
"ooooong."
Perhaps this is more efficient, since the string concatenation can be
done by Python's parser rather than at runtime?
Lars Kellogg-Stedman <8273grkci8q8... at jetable.net> wrote:
>
> > print "a string whcih is very very looooooooooooooooooooooooooooooooooo\
> > oooooooooooooooooooong."
>
>
> print "a string which is very loooooo" \
> + "ooooong."
>
> -- Lars
--
Lars Kellogg-Stedman <8273grkci8q8... at jetable.net>
This email address will expire on 2005-11-23.
More information about the Python-list
mailing list