keys and values lining up
Emile van Sebille
emile at fenx.com
Mon Sep 27 20:50:16 EDT 1999
I'm not sure if that's safe or not, but you can certainly do:
for k, v in d.items():
print k,v
--
Emile van Sebille
emile at fenx.com
-------------------
Nathan Clegg <nathan at islanddata.com> wrote in message
news:XFMail.990927160353.nathan at islanddata.com...
> If d is a dict, am I guaranteed that d.keys() and d.values() will line
up,
> in proper order, if called successively with no modification in
between?
> That is, is the following safe?
>
> k,v = d.keys(), d.values()
>
> Thanks!
>
>
> ----------------------------------
> Nathan Clegg
> nathan at islanddata.com
>
>
>
>
More information about the Python-list
mailing list