Walking lists together
zip(beats, hits) pairs two lists up item by item. enumerate(pattern) pairs each item with its position. Unpack the pairs right in the loop: for b, h in zip(beats, hits):
Challenge A:beats = [1, 2, 3, 4] and hits = [1, 2, 1, 4]. Loop i over range(4), playing snare(beats[i], hits[i]).