MTD wrote:
Hari Sekhon wrote:
  
Is it better to do:

message = """This is line1.
This is line2
This is line3\n"""

or

message = "This is line1.\n
message = message + "This is line2\n"
message = message + "This is line3\n"
    

Is there any reason you can't do it in one line?

message = "This is line1.\nThis is line2.\nThis is line3.\n"

  
this would also be ugly though, a huge lone line for the paragraph I want to output, which would wrap around and break the visual indentation.

otherwise I could do it in one line. but if I was going to do that and it was going to be so long, I'd just use """..."""
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to