Program on Python map List to Python Map Dictionary || Dictionary || Python
In this we are going to see a basic program to map lists to a dictionary in Python Programming Language.



list1 = [1,2,3,4,5]
list2 = ['a','b','c','d','e']
dict1 = dict()
for i in range(len(list1)):
    dict1[list1[i]] = list2[i]
print("Dictionary after mapping: ",dict1)


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post