Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Words Order by mindaugas.dadurkevicius
def words_order(text, words):
if len(set(words)) < len(words):
return False
text_words = text.split()
for word in words:
try:
pos = text_words.index(word)
except:
return False
text_words = text_words[pos+1:]
return True
June 18, 2021