On Sun, 14 Aug 2016 11:53 am, John Wong wrote: > The way I solve it, and I still find that extremely ugly, is > > s = ("this string continues " + > "substring continues")
You don't need the plus sign, as Python will concatenate string literals (not variables) at compile time: "foo" 'bar' # compiles as 'foobar' Note that you can mix any of the string delimiters, including raw strings. And they don't have to be on the same line: raise ValueError( "This is a long 'error message' using" ' mixed "quotes" specifically so I can' " show off Python's string literal concatenation." ) That's equivalent to the one-line: raise ValueError("This is a long 'error message' using mixed \"quotes\" specifically so I can show off Python's string literal concatenation.") -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. -- https://mail.python.org/mailman/listinfo/python-list