Questions about input lines (maximum length and continuation)

Dan Bishop danb_83 at
Wed Jul 4 05:46:58 CEST 2007

On Jul 3, 10:41 pm, Robert Dodier <robert.dod... at> wrote:
> Hello,
> I'm planning to write a program which automatically generates
> Python code.
> (1) Is there a limit on the length of a line in a Python program?


> (2) From what I understand, symbols, operators, and numbers
> cannot be broken across lines continued with the backslash
> character. Is there any way to allow symbols, operators, and
> numbers to be broken across lines?

>>> exec '''my_
... var = 1234
... 567'''.replace('\n', '')
>>> my_var

Why do you want to do this?

More information about the Python-list mailing list