I am forever forgetting how to format strings in Python and have probably Googled questions related to Python’s format specification mini-language over a thousand times now. For my own reference I put together a quick-reference for the commands I type most frequently. Maybe it will be useful to other chronic Googlers of the same thing, so feel free to use this for anything that you like.

The new-style Python string formatting quick reference is also available as a PDF here
Leave a comment