I have this kind of line concatenation:
t = "first long line" +\
"second long line" +\
"third long line"
Syntax error is raised if the second line is commented out in place with hash #
The matter is I don't wish to remove the second line as it may be enabled back on, moving the 2nd line off the concatenation sequence isn't desired too as others in the team and even myself would forget when that 2nd line should be back on and the 3 lines must be in that order.
There's no such /*...*/
in Python, but any other work-arounds?
To be able to use hashtag #
to comment stuff out while adding, you can do it with a list:
t = ["first long line" ,
#"second long line" ,
"third long line"]
print(''.join(t))
Result:
first long linethird long line