Inelegant

gry at ll.mit.edu gry at ll.mit.edu
Thu Apr 14 09:17:28 EDT 2005


I sometimes use the implicit literal string concatenation:

def SomeFunction():
   if SomeCondition:
      MyString = 'The quick brown fox ' \
                 'jumped over the ' \
                 'lazy dog'
      print MyString

SomeFunction()
The quick brown fox jumped over the lazy dog


It looks pretty good, I think.  One could use triple quotes too, if the
string
contains quotes.

-- George




More information about the Python-list mailing list