Creating dictionary from two lists using zip
names = ['Jan', 'Feb', 'Mar', 'Apr']
days = [31, 28, 31, 30]
zipped = zip(names, days)
print(zipped)
print(list(zipped))
zipped = zip(names, days)
month = dict(zipped)
print(month)
Output:
{'Jan': 31, 'Feb': 28, 'Mar': 31, 'Apr': 30}