list to dict

Bart Nessux bart_nessux at hotmail.com
Wed Jun 16 10:07:00 EDT 2004


Peter Hansen wrote:
> Bart Nessux wrote:
> 
>> What is the easiest/fastest way to build a dictionary from a list? The 
>> list contains 100,000 entries.
> 
> 
> A dictionary has key/value pairs.  How do you want to map
> the elements of your list to this format?  In pairs, or
> are you using them all as keys, or something else?
> 
> -Peter

1 = book1
2 = book2
3 = book3
etc...



More information about the Python-list mailing list