Can a signal tape be split into known patterns?
A recorded "tape" is one long string. You have a dictionary of valid motifs (short strings). Decide whether the whole tape can be cut into a sequence of motifs back-to-back, using each motif as many times as you like.
tape = "upupdn", motifs = ["up", "dn", "updn"]
-> True # "up" + "up" + "dn" (also "up" + "updn")
Return whether the tape splits exactly into dictionary motifs (word break).
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.