create dict from two lists python without zip()? -


i'm creating dict using zip(), how without zipping or numpy?

def listtodict(list1, list2): d={} return dict(zip(list1, list2))   print listtodict([1,2,3,4,5],['a','b','c','d','e']) 

just fun...

def listtodict(list1, list2):     return dict(max(vars(__builtins__).items())[1](list1, list2)) 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -