<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;"><br><br>June 8 2015 3:11 PM, "Skip Montanaro" <<a target="_blank" tabindex="-1" href="mailto:%22Skip%20Montanaro%22%20<skip.montanaro@gmail.com>">skip.montanaro@gmail.com</a>> wrote:<blockquote><p>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.</p><div></div><div>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.</div><div></div><div>Thx,</div><div></div><div>Skip</div><div></div></blockquote><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);"></span><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">Hi,</span><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">I think </span><a style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;" href="http://pyformat.info/">http://pyformat.info/</a><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);"> is what you're looking for.</span><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">Thanks,</span><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">​</span><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">--</span><br style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">Steven Knight <</span><a target="_blank" style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;" href="mailto:steven@knight.cx">steven@knight.cx</a><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px; background-color: rgb(255, 255, 255);">></span></div></body></html>