Cheat sheet for the new string formatting?

Skip Montanaro skip.montanaro at gmail.com
Mon Jun 8 15:09:37 EDT 2015


I have so far ignored the new string formatting (you know, the stuff with
all the braces, dots and brackets that make Python strings look like Perl
code <wink>). I am still only using Python 2.7, but have recently started
forcing myself to use the print() function. I figure maybe I should also
start to come to grips with the fancy new string formatting.

Is there a cheat sheet around which shows some side-by-side examples of the
{}-style and printf-style? I didn't see anything with a few Google searches.

Thx,

Skip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150608/39df17a5/attachment.html>


More information about the Python-list mailing list