tags:

views:

55

answers:

2

i am saying

s1="some very long string............"

and it gives me the above mentioned error

anyone konw what i am doing wrong?

A: 

you are not putting a " before the end of the line.

use

""" a very long string ...... 
....that can span multiple lines
"""

if you want to do this.

aaronasterling
A: 

(Assuming you don't have/want line breaks in your string...)

How long is this string really?

I suspect there is a limit to how long a line read from a file or from the commandline can be, and because the end of the line gets choped off the parser sees something like s1="some very long string.......... (without an ending ") and thus throws a parsing error?

You can split long lines up in multiple lines by escaping linebreaks in your source like this:

s1="some very long string.....\
...\
...."
JanC