Documentation for iteration in mappings

Dennis Benzinger Dennis.Benzinger at gmx.net
Tue Oct 25 17:05:36 CEST 2005


Hi!

I must be blind because I didn't find anything in the documentation 
which says iterating over an dictionary iterates over its keys.

For example

a_dictionary = {0: "zero", 1: "one"}
for x in a:
     print x

gives you

0
1

Where is this information hidden? :)

Bye,
Dennis



More information about the Python-list mailing list