Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Goes Right After by catloverss
def goes_after(word: str, first: str, second: str) -> bool:
# Check for edge cases
if first == second or first not in word or second not in word:
return False
# Compare indices of first occurrences
return word.index(first) + 1 == word.index(second)
Dec. 5, 2025
Comments: