The keys, values, and items Functions : iteritems « Dictionary « Python Tutorial






params = {"A":"a", "B":"b", "C":"c", "D":"d"} 
print params.keys()                             
print params.values()                                
print params.items()








8.15.iteritems
8.15.1.iteritems method returns an iterator instead of a list
8.15.2.Swap keys for values
8.15.3.The keys, values, and items Functions