"str"(expr)"str" interpolation syntax

Beni Cherniavsky cben at tx.technion.ac.il
Mon Sep 16 16:15:12 EDT 2002


richie at entrian.com (Richie Hindle) wrote:
> Guido's time machine strikes again:
> 
> >>> foo, bar, quux = 1, 2, '3'
> >>> print ("A template string - here: %s it goes\n" % foo +
> ...        "Also multiple values: %s, %s\n" % ( bar, quux ) +
> ...        "Quoting percent (%s) sings probably not needed...\n" % '%')
> A template string - here: 1 it goes
> Also multiple values: 2, 3
> Quoting percent (%) sings probably not needed...

Well, all right.  I'll find something more useful to do than repainting
the wheel ;-)



More information about the Python-list mailing list