Hence the example from the Python docs: '%(language)s has %(count)03d quote types.' % vars() I would like to extract the keys in the formatting string to a list. Well I can parse it myself but is there a built-in function to extract a list/tuple of the dictionary keys, e.g. ['language','count'] in this case? Thanks. Ciao, Michael.