After check Checkio shows me an error, see in attachment.
def words_order(text: str, words: list) -> bool:
splitted_text = text.split()
new_list = []
for word in splitted_text:
if word in words:
new_list.append(word)
return new_list == words
if name == 'main':
print("Example:")
print(words_order("hi world world im here",["world","world"]))
# These "asserts" are used for self-checking and not for an auto-testing
assert words_order("hi world world im here",["world","world"]) == False
Created at: 2021/07/08 08:11; Updated at: 2021/07/08 08:57
The question is resolved.