Python program to Make List of Dictionaries Using 2 Lists

x = ['a','b','c','d','e'] y = [1,2,3,4,5] z = {} for i in range(len(x)): z = dict(zip(y,x)) print(z)

 

 

Output:

{1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e'}