prize17-6, Exercise 3: More tritone substitutions notes = ["C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab", "A", "Bb", "B"] def tritone_sub(root): return notes[(notes.index(root) + 6) % 12] for chord in ("A7", "Bb7", "E7"): root = chord[:-1] print(chord, "->", tritone_sub(root) + "7") Output (run and checked): A7 -> Eb7 Bb7 -> E7 E7 -> Bb7 What you notice: B-flat 7 and E7 are each other's substitution. Moving six semitones up and then six semitones more returns to the start, because six plus six is twelve, a whole octave. Care: the program uses flat names only, so it cannot accept a sharp name such as F-sharp 7 (it would raise an error); write it as Gb7 instead.