Answers for "create a dictionary of cricketers. use this list to create a dictionary in which the list values becomes key values of dictionary. set the values of all keys to 50 in the dictionary created."

3

create dictionary key and values from lists

keys = ['a', 'b', 'c']
values = [1, 2, 3]
dictionary = dict(zip(keys, values))
print(dictionary) # {'a': 1, 'b': 2, 'c': 3}
Posted by: Guest on September-14-2021

Code answers related to "create a dictionary of cricketers. use this list to create a dictionary in which the list values becomes key values of dictionary. set the values of all keys to 50 in the dictionary created."

Python Answers by Framework

Browse Popular Code Answers by Language