Use parentheses to split long Python code across lines: But with parentheses, Python sees it as one line: Or in comprehensions…
Note: As usual, readers of my blog (and my students) found a simpler and more elegant solution than I did… I knew that the boolean “or” operator returned the first “True” value it encountered, but I completely forgot that if it only encounters “False” values, it returns the final one. So there was a far…