Posted By

dorseye on 08/19/09


Tagged

list python dictionary


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

gartenstuhl


Pass list to dict()


 / Published in: Python
 

  1. >>> i
  2. ['a', 'b']
  3. >>> l
  4. [1, 2]
  5. >>> dict([i,l])
  6. {'a': 'b', 1: 2}

Report this snippet  

You need to login to post a comment.