Line continuation for a string > 79 characters

Paul Brian paul1brian at yahoo.com
Wed Jan 9 05:31:12 EST 2002


Dear all,

probably a foolish question, but how do I break up a string that has more
than 79 characters so it looks pretty / adheres to style guides?
eg

filename = '\\myroot\\somefolder...arbitrarty
path...\\yetanotherfolder\\foo.txt'

I can do this

filename = '\\myroot\\somefolder\\someotherfolder\
\\anotherfolder\\stillanotherfolder\
\\yetanotherfolder\\foo.txt'

but it just confuses me

is there a better way or do I just stay confused and get over it?

cheers

P Brian






More information about the Python-list mailing list