So, you are getting good at Python dictionaries, but you must keep stepping up the ladder. — Copying each key and value to another dictionary Traditional way: a = {'hey': 1, 'ho': 2, "let's": 3, 'go': 4}
b = {}
for k, v in a.items():
b[k] = v
print(b)
>>> {'hey': 1, 'ho': 2, "let's": 3, 'go': 4} Using Dictionary Comprehensions: a = {'hey': 1, 'ho': 2, "let's": 3, 'go': 4}
b = {k: v for…