Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Words Order by tokiojapan55
def words_order(text: str, words: list) -> bool:
result = [text.split().index(w) for w in words if w in text.split()]
return result == sorted(result) and len(set(result)) == len(words)
June 23, 2020
Comments: