I have two lists which I'm mapping into a dictionary.
The two lists are-
a = ['a','b','c','d']
and b = [1,2,3,4]
.
When I run the command
>>> d = dict(zip(a,b))
>>> d
I get
{'a': 1, 'c': 3, 'b': 2, 'd': 4}
whereas the expected value is {'a': 1, 'b': 2, 'c': 3, 'd': 4}
Why this change in the order of the keys?