3 ms·
You just need to add an escape character, "\". This is python 101 This is properly interpreted: foo = 1 + \ 2
by opportune 9y ago
You just need to add an escape character, "\". This is python 101
This is properly interpreted:
foo = 1 + \
2
- Too 9y agoPython will automatically escape newlines in some contexts. Another way to accomplish the above is to wrap the expression in parenthesis. foo = (1 + 2)
- ben-schaaf 9y agoOf course, the point I was making is that it's perfectly possible to write a parser that understands newline as a terminator without sacrificing these idiosyncrasies.