Get dict value but not as reference.
robert.rawlins at thinkbluemedia.co.uk
Wed Jul 23 17:49:11 CEST 2008
This feels like a strange question but it's not something I've done before,
I'm sure it's quite simple.
I have a dictionary, and I want to get one of the values from it, but rather
than returning it as a reference I want to actually detach/remove the
element from the dictionary. Like so:
Something = self.my_dict["keythatIwanttoredetach"]
I can then use something, however, it no longer exists in the dictionary.
Sorry, I couldn't really explain this very well. How can I achieve this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list