accessing keys in dict

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Aug 25 08:41:12 EDT 2007


In message <1187143106.021325.104690 at l22g2000prc.googlegroups.com>,
james_027 wrote:

> is there any difference between ..
> 
> for key in a_dict:
> 
> from
> 
> for key in a_dict.keys():

I'm assuming the former is equivalent to 

    for key in a_dict.iterkeys() :



More information about the Python-list mailing list