Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Words Order by Teja_002
def words_order(text, words):
text = text.split() #Converting the text into a list of words in the text
a = 0 #A variable that stores the position/index of the word (of words list) in text
for word in words:
if word not in text[a:] or words.count(word)>1:
return False
a = text.index(word)+1
return True
March 15, 2021
Comments: