question regarding dictionaries

Emile van Sebille emile at
Thu Nov 1 16:29:45 CET 2001

"Rajarshi Guha" <rxg218 at> wrote in message
news:9rrp75$qai at
> Hi,
>   I have a question regarding dictionaries. When I compare them as
> if (dict1 == dict2):
>   print 'ok'
> Where dict1 and dict2 shoudl have the same key and corresponding key
> It seems to work. Is it meant to work, or am I just being lucky.

Yes.    ('s meant to work  ;-)

> And secondly why won't thjis work:
> for i,j in list1,list2:
>   #do something with i and j


for i,j in zip(list1, list2):


Emile van Sebille
emile at


More information about the Python-list mailing list