3 ms·
Once you are in the parentheses line breaks in python are just fine, no additional symbols needed. result = ((( 1 + 3 + 8) /
by mythrwy 9y ago
Once you are in the parentheses line breaks in python are just fine, no additional symbols needed.
result = ((( 1 +
3 +
8) /
2)
* 6)
works.
Also works as a way to deal with long strings without the \.
long_string = ('hello'
'really'
' really'
' long'
' line'
)
- brudgers 9y agoLine breaks in Python are generally unconventional. For what it is worth, the PEP 8 recommendation is for the operator to begin the line (Knuth style), i.e. result = ((( 1 + 3 + 8) / 2) * 6) How much that looks like Lisp is a matter of opinion I suppose.