ZIP -Liste zu Dictionary Python
keys = ['a', 'b', 'c']
values = [1, 2, 3]
dictionary = dict(zip(keys, values))
print(dictionary)
# {'a': 1, 'b': 2, 'c': 3}
keys = ['a', 'b', 'c']
values = [1, 2, 3]
dictionary = dict(zip(keys, values))
print(dictionary)
# {'a': 1, 'b': 2, 'c': 3}
# app.py
stocks = ['reliance', 'infosys', 'tcs']
prices = [2175, 1127, 2750]
dictionary = dict(zip(stocks, prices))
print(dictionary)
# convert 2 lists into a dictionary, use zip()
aa = [1, 2, 3]
bb = ["a", "b", "c"]
print(dict(zip(aa, bb)))
# {1: 'a', 2: 'b', 3: 'c'}