Search code examples
pythonline-breaks

How do I add a line-break to a multiple assignment statement?


In the following Python example:

a1,  a2,  ..., a30,
a31, a32, ..., a60 = get_values()

I can't insert a line-break after the variable a30 because if I do that the syntax is not correct. But then I do not know how I could correctly write code lines with any possible large length I might think of.


Solution

  • I could do it eventually by adding brackets as follows:

    (a1, a2, ................a30,
    a31, a32, ..............a60) = get_values()