[Tutor] A replacement for a "for" loop

Scott Oertel freebsd at scottevil.com
Thu Aug 30 21:10:56 CEST 2007


Terry Carroll wrote:
> On Wed, 29 Aug 2007, Scott Oertel wrote:
>
>   
>> Why even have the keys variable at all..
>>
>> for key in attrs:
>>     print 'Attribute %s has value %s' % (key, attrs[key])
>>     
>
> In a prior email thread, the OP indicated that he needed to process the 
> keys in that particular order; and it's not really amenable to any sort.
>
>   

Yup, I didn't see that the first time, sorry.

-Scott Oertel



More information about the Tutor mailing list