J
John Salerno
How do you make a single string span multiple lines, but also allow
yourself to indent the second (third, etc.) lines so that it lines up
where you want it, without causing the newlines and tabs or spaces to be
added to the string as well?
Example (pretend this is all on one line):
self.DTD = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01//EN"\n"http://www.w3.org/TR/html4/strict.dtd">\n\n'
I want it to read:
self.DTD = '''<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n
"http://www.w3.org/TR/html4/strict.dtd">\n\n'''
Or anything like that, but I don't want the extra newline or tabs to be
a part of the string when it's printed.
Thanks.
yourself to indent the second (third, etc.) lines so that it lines up
where you want it, without causing the newlines and tabs or spaces to be
added to the string as well?
Example (pretend this is all on one line):
self.DTD = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01//EN"\n"http://www.w3.org/TR/html4/strict.dtd">\n\n'
I want it to read:
self.DTD = '''<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"\n
"http://www.w3.org/TR/html4/strict.dtd">\n\n'''
Or anything like that, but I don't want the extra newline or tabs to be
a part of the string when it's printed.
Thanks.