prize17-9, Exercise 2: Where the snare plays snare = "....x.......x..." steps = len(snare) backbeats = [i + 1 for i, c in enumerate(snare) if c == "x"] print("snare falls on steps:", backbeats, "of", steps) Output (run and checked): snare falls on steps: [5, 13] of 16 Why it works: enumerate gives each character's position starting from 0, so adding 1 gives step numbers starting from 1. The list comprehension keeps only the positions where the character is "x". The bar has 16 steps, four to a beat, so steps 5 and 13 are the second and fourth beats. Care: remember the +1. Without it the program would print [4, 12], which counts from zero.