Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
zip solution in Clear category for Goes Right After by Phil15
def goes_after(word: str, first: str, second: str) -> bool:
if first == second:
return False
for a, b in zip(word, word[1:]):
if a == first:
return b == second
if a == second:
return False
return False
March 6, 2020