how to create dictionary in python
# dictionary parameters
keys = ['a', 'b', 'c']
values = [1, 2, 3]
# create dictionary func.
def create_dictionary(keys, values):
result = {} # empty dictionary
for key, value in zip(keys, values):
result[key] = value
return result
# use create_dictionary func.
print(create_dic(keys=keys, values=values))
""" output:
{'a': 1, 'b': 2, 'c': 3}
"""