What is the most pythonic way to build up large strings?

Dave Angel davea at davea.name
Sat Feb 8 15:25:31 CET 2014


 cstrutton11 at gmail.com Wrote in message:

> 
> I didn't realize I could use formatting with triple quoted strings.  I will look into that.
> 


You probably realize this,  but formatting does not work on
 literals of any kind. It works on str objects,  which can be
 created by any kind of literal, or by concatenation,  or by
 conversion, or by I/O,  or ...

So all 16 (?) variants of string literals may be used.
-- 
DaveA




More information about the Python-list mailing list