7. Beats as Keys

Number keys

Keys can be numbers too: by_beat = {1: "kick", 3: "snare"} maps each beat to the drum that plays it.

🎯 0/4 · 🥁 0 solved · 🏅 0

Challenge A:hits = {1: "kick", 3: "snare"}. For beat, name in hits.items(): kit[name](beat).

Goal
snare
kick
1234