My first Python program

Jonas H. jonas at
Thu Oct 14 00:00:09 CEST 2010

On 10/13/2010 11:26 PM, Seebs wrote:
>>      stderr.write(
>>          "WARNING:"
>>          " Pants on fire\n")
> Hmm.  So I just indent stuff inside the ()s or whatever?  I can work with
> that.

I think common is

     stderr.write("WARNING: ",
                  "Pants on fire")


         "WARNING: "
         "Pants on fire"

If you haven't got braces around an expression and you want it to be 
multi-line, you need a '\' at the end of each line, just like C macros:

     msg = "WARNING: " \
           "Pants on fire"

Though that is not commonly used afaik.

More information about the Python-list mailing list