According to PEP 8, Python's official style guide, line breaks before binary operators produce more readable code, especially in code blocks with long expressions. This is stated in several sources (1,2,6,8) and is a widely accepted convention.
[References:, https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator, https://stackoverflow.com/questions/30614124/are-long-lines-broken-up-before-or-after-binary-operators-in-python, https://www.quora.com/What-is-PEP-8-Python, https://www.techbeamers.com/python-tutorial-pep-8/, https://www.section.io/engineering-education/python-coding-conventions-guidelines-for-python-programming/, https://towardsdatascience.com/a-step-in-pep8-style-guide-improving-the-readability-of-the-code-8114fd4ccefa, https://www.codementor.io/@rishikeshdhokare/python-coding-style-best-practices-that-every-python-programmer-must-know-xybbcubb8, https://www.dataschool.io/python-pep8-tips-and-tricks/, , ]
Submit