Walk through dictionary keys?

Neil Schemenauer nas at arctrix.com
Tue Dec 19 11:36:28 CET 2000

On Tue, Dec 19, 2000 at 05:23:37PM +0100, Carsten Gaebler wrote:
> Is there a way of 'walking' through the keys of a dictionary? If I have
> a large dictionary I'd like to prevent 
> for key in d.keys():
>     do_something

Python 2.1 will have a d.popitem() method for just this purpose.


More information about the Python-list mailing list