2. Loop Through a Dictionary

Looping over keys and .items()

for name in song: loops over the keys. for name, beats in song.items(): hands you each key and value together. Put the drums themselves in a dictionary too — kit["kick"] is the kick command.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:The kit dictionary maps names to drums (kit["kick"] is kick). For each name in song, call kit[name](song[name]).

Goal
snare
kick
1234
5678