I finally have learned the bare bones of the Format Specification Mini-Language of Python 3.1+, and thought I&#39;d share something of what I&#39;ve learned with fellow Tutorees who might be interested. I find this &quot;mini-language&quot; to be a refreshing change from the formatting in use in 2.6, etc. But when I first saw it in Learning Python, 4th ed., I was put off by it and never went back until I needed to yesterday. It was the docs themselves that had the best explanation and examples. So here are those links:<br>

&lt;<a href="http://docs.python.org/py3k/library/string.html#format-specification-mini-language">http://docs.python.org/py3k/library/string.html#format-specification-mini-language</a>&gt;<br>&lt;<a href="http://docs.python.org/py3k/library/string.html#format-examples">http://docs.python.org/py3k/library/string.html#format-examples</a>&gt;<br>

<br>I wanted to have the columns of output from my dollar2yen_rate_simple_for_python31.py line up correctly, and found, after a bit of experimentation, how to do it. If you run it (with Python 3.1+ (not 3.0)) &lt;<a href="http://tutoree7.pastebin.com/5Z4g60L5">http://tutoree7.pastebin.com/5Z4g60L5</a>&gt;, you&#39;ll see that the new formatting works perfectly -- the minus signs don&#39;t produce a jaggedness in those two columns 3 and 4 any more. Here&#39;s a screen shot of some lines of output: &lt;<a href="http://www.rcblue.com/Misc/columns.jpg">http://www.rcblue.com/Misc/columns.jpg</a>&gt;<br>

<br>I found that formatting a number as a percentage is easy with the mini-language. Here&#39;s an example I whipped up:<br><br>&gt;&gt;&gt; a = 123.345<br>&gt;&gt;&gt; b = 567<br>&gt;&gt;&gt; a/b<br>0.21753968253968253<br>

&gt;&gt;&gt; print(&#39;{:.2%}&#39;.format(a/b))<br>21.75%<br><br><br><br>In addition, if you are interested in doing some simple web scraping with 3.1, highlighted lines 6, 25, 26 in my code show what worked for me with what at first was very hard to understand until I found the examples in the docs for the use of urllib.request: &lt;<a href="http://docs.python.org/py3k/library/urllib.request.html?highlight=urllib#examples">http://docs.python.org/py3k/library/urllib.request.html?highlight=urllib#examples</a>&gt; <br>

<br>I&#39;ve heard that a better way is to use BeautifulSoup (&lt;<a href="http://www.crummy.com/software/BeautifulSoup/">http://www.crummy.com/software/BeautifulSoup/</a>&gt;), but figuring that out is a bit of a ways down my TODO list. <br>

<br>Dick Moores<br><br>