Top-rated recipes tagged "strings" and "formatting"http://code.activestate.com/recipes/tags/strings+formatting/top/2011-08-16T11:44:59-07:00ActiveState Code Recipesformat_iter: easy formatting of arbitrary iterables (Python)
2011-08-16T11:44:59-07:00Nick Coghlanhttp://code.activestate.com/recipes/users/2035254/http://code.activestate.com/recipes/577845-format_iter-easy-formatting-of-arbitrary-iterables/
<p style="color: grey">
Python
recipe 577845
by <a href="/recipes/users/2035254/">Nick Coghlan</a>
(<a href="/recipes/tags/formatting/">formatting</a>, <a href="/recipes/tags/strings/">strings</a>).
</p>
<p>The <code>format_iter</code> recipe defines a simple wrapper around <code>str.join</code> and <code>str.format</code> that makes it easy to format an arbitrary iterable with a specified format string and item separator.</p>