Building a multiline string

Duncan Booth duncan.booth at invalid.invalid
Thu Feb 4 13:23:35 EST 2010


lallous <lallous at lgwm.org> wrote:

> Now should I be using method 2 or 3 in production code?

Also Method1a:

# Method1a
x = ("line1" + # can use comments!
     "line2"+
     "line3")

Use Method1a or Method3 as you prefer: either of these generates a single 
string constant. Method2 is dumb.



More information about the Python-list mailing list