Multiline code - trailing slash usage

Duncan Booth duncan.booth at invalid.invalid
Thu Mar 15 11:54:13 EDT 2007


Steve Holden <steve at holdenweb.com> wrote:

> x = "hello world, this is my multiline " \
>       "string!!!!"
> 
> and this would have saved you a run-time string concatenation :)

or use parentheses for an alternative which doesn't need the backslash:

x = ("hello world, this is my multiline " 
      "string!!!!")





More information about the Python-list mailing list