Create dict from two lists
Carsten Haese
carsten at uniqsys.com
Fri Feb 10 08:56:17 EST 2006
More information about the Python-list mailing list
Fri Feb 10 08:56:17 EST 2006
- Previous message (by thread): Create dict from two lists
- Next message (by thread): Create dict from two lists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2006-02-10 at 08:51, py wrote: > I have two lists which I want to use to create a dictionary. List x > would be the keys, and list y is the values. > > x = [1,2,3,4,5] > y = ['a','b','c','d','e'] > > Any suggestions? looking for an efficent simple way to do this...maybe > i am just having a brain fart...i feel like this is quit simple. d = dict(zip(x,y)) -Carsten
- Previous message (by thread): Create dict from two lists
- Next message (by thread): Create dict from two lists
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list