# dictionary is a collection of key-value pairs
d1 = { "John": 25, "Alice": 23}
d2 = {}
d3 = { "John": ["111-2233","222-1234"],
"Alice": ["234-2233"]}
d3["John"]
['111-2233', '222-1234']
d3["John"][0]
'111-2233'
d1
{'John': 25, 'Alice': 23}
d1["Raj"] = 65
d1
{'John': 25, 'Alice': 23, 'Raj': 65}
del d1["Raj"]
d1
{'John': 25, 'Alice': 23}
"Raj" in d1
False
"John" not in d1
False
list(d1.keys())
['John', 'Alice']
wins = {}
teams = ["CHC","ATL"]
for t in teams:
wins[t] = 0
print(wins)
{'CHC': 0, 'ATL': 0}
wins["CHC"] = wins["CHC"] + 1
wins
{'CHC': 1, 'ATL': 0}