About 229,000 results
Open links in new tab
  1. How can I do a line break (line continuation) in Python (split up a ...

    From PEP 8 -- Style Guide for Python Code: The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation.

  2. Is it possible to break a long line to multiple lines in Python?

    In Python code, it is permissible to break before or after a binary operator, as long as the convention is consistent locally. For new code Knuth's style (line breaks before the operator) is suggested.

  3. Python style - line continuation with strings? - Stack Overflow

    In trying to obey the python style rules, I've set my editors to a max of 79 cols. In the PEP, it recommends using python's implied continuation within brackets, parentheses and braces. However, ...

  4. python - Comments in continuation lines - Stack Overflow

    May 5, 2015 · The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses.

  5. Correct style for line breaks when chaining methods in Python

    Jan 7, 2018 · The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation. Make sure to indent the continued line appropriately.

  6. Python: Continuing to next iteration in outer loop

    May 30, 2011 · I wanted to know if there are any built-in ways to continue to next iteration in outer loop in python. For example, consider the code: for ii in range(200): for jj in range(200, 400): ...

  7. Breaking a line of python to multiple lines? - Stack Overflow

    The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation. Make sure to indent the continued line appropriately.

  8. How to write long arithmetic expressions in several lines in python ...

    Dec 4, 2018 · How can I do a line break (line continuation) in Python (split up a long line of source code)? (11 answers)

  9. How to get to a new line in Python Shell? - Stack Overflow

    Jan 16, 2024 · Yeah it works, but two questions: 1.where did you learn this, in Python tutorial? 2.This is too unnatural, is there a way i can just type Enter to go to a new line, like in most IDEs?

  10. if statement - if pass and if continue in python - Stack Overflow

    There is a fundamental difference between pass and continue in Python. pass simply does nothing, while continue jumps to the next iteration of the for loop. The statement if not 0 always evaluates to True, so both pass and continue statements will be executed. pass will do nothing and print the value, while continue will skip to the next iteration ignoring the print statement …

Refresh