Strings
Text (a string) works like a list of characters. "x.x." has 4 characters and pattern[0] is "x". Drummers write beats this way: x for a hit, . for a rest.
Challenge A:pattern = "x.x.x.x." — loop for i in range(len(pattern)): and play the kick on i + 1 if pattern[i] == "x".