Subscribe Us

Header Ads

How To convert Two lists To Dictionary using Zip function in Python | interview Programs |

 Hey guys in this video i am gonna tell you how you can convert 2 lists to dictionary in python |




Source Code..

#creating two list

list1 = [70, 50, 100, 60]

list2 = ['python', 'java', 'rust', 'go']

#converting into dictionary using zip function
dictionary = dict(zip(list2, list1))

#printing a dictionary
print(dictionary['python'])


Post a Comment

0 Comments