Questions about input lines (maximum length and continuation)
Dan Bishop
danb_83 at yahoo.com
Tue Jul 3 23:46:58 EDT 2007
On Jul 3, 10:41 pm, Robert Dodier <robert.dod... at gmail.com> 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?
No.
> (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
1234567
Why do you want to do this?
More information about the Python-list
mailing list