Skip to content

Instantly share code, notes, and snippets.

View starwarsgeek1138's full-sized avatar

Stefanie Acevedo starwarsgeek1138

View GitHub Profile
def find_chords(chords, music):
"""Search for chords within music (O(n) time).
:param list chords: chords to look for, in order
:param list music: music to search within
"""
if len(music) < len(chords):
return 0
my_chord_i = -1
occurrences = 0
for my_chord in music: