Questions about input lines (maximum length and continuation)

R

Robert Dodier

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?

Thanks a lot for any information. I appreciate your help.

Robert Dodier
 
D

Dan Bishop

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?
.... var = 1234
.... 567'''.replace('\n', '')1234567

Why do you want to do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top