The end of the other
Check out my code and tell me where's the error. Thank you.
def checkio(words_set): if len(words_set) == 1: return False for suffix in words_set: for word in words_set: if suffix != word: return word.endswith(suffix) #These "asserts" using only for self-checking and not necessary for auto-testing if __name__ == '__main__': assert checkio({"hello", "lo", "he"}) == True, "helLO" assert checkio({"hello", "la", "hellow", "cow"}) == False, "hellow la cow" assert checkio({"walk", "duckwalk"}) == True, "duck to walk" assert checkio({"one"}) == False, "Only One" assert checkio({"helicopter", "li", "he"}) == False, "Only end"