Lengthy single line strings in Python without going over maximum line length
python, string
Solution
if True:
print "long test long test long test long test long"\
"test long test long test long test long test long test"
Problem
How can I break a long one liner string in my code and keep the string indented with the rest of the code? PEP 8 doesn't have any example for this case. Correct ouptut but strangely indented: ``` if True: print "long test long test long test long test long \ test long test long test long test long test long test" >>> long test long test long test long test long test long test long test long test long test long test ``` Bad output, but looks better in code: ``` if True: print "long test long test long test long test long \ test long test long test long test long test long test" >>> long test long test long test long test long test long test long test long test long test long test ``` Wow, lots of fast answers. Thanks!