for key, value in dict.<func>() - how to get? (which func)

Gary Duzan mgi820 at
Tue Aug 11 21:44:49 CEST 2009

In article <e3e8255f-0158-481b-8c96-fb20261f7ad6 at>,
dmitrey  <dmitrey.kroshko at> wrote:
>hi all,
>which method should I use to get iterator over (key, value) pairs for
>Python dict, Python v 2.6 and above?


>>> import sys
>>> for (key, value) in sys.modules.iteritems(): print key, value

					Gary Duzan
					Motorola H&NM

More information about the Python-list mailing list