Get dictionary-keys used to format a string

Michael Ströder michael.stroeder at
Thu Mar 2 11:27:05 CET 2000

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?


Ciao, Michael.

More information about the Python-list mailing list