pretty

Tuesday, April 26, 2016

Map two lists to a dict in python

Sort tuples in list based on date

keys = ['a', 'b', 'c']
values = [1, 2, 3]
dictionary = dict(zip(keys, values))
print dictionary

#{'a': 1, 'b': 2, 'c': 3}



No comments:

Post a Comment