Dan Stromberg <drsali...@gmail.com> writes:

> Is there a way of getting the key used by the dictionary, short of
> storing a reference to it in the value, or using a second dictionary?

The dictionary knows its keys and can provide them on request. Call the
‘dict.keys’ method to get them as a collection.

-- 
 \     “Capitalism has destroyed our belief in any effective power but |
  `\      that of self interest backed by force.” —George Bernard Shaw |
_o__)                                                                  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to