i'm trying to get this output:
[{'A':{'a':1, 'b':2, 'c':3}}, {'B':{'a':4, 'b':5, 'c':6}}]
from this:
list1 = [[1,2,3],[4,5,6]]
list2 = ['a','b','c']
list3 = ['A','B']
And i tried this:
list1 = [[1,2,3],[4,5,6]]
list2 = ['a','b','c']
list3 = ['A','B']
main_list =[]
for i in range(len(list1)):
db1 = dict(zip(list2,list1[i]))
for j in range(len(list3)):
db2 = dict(zip(list3[j],db1))
main_list.append(db2)
print(main_list)
Any help would be really appreciated