Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for The End of Other by Anna_Barys
def checkio(words_set):
lista = []
w = 0
for x in (words_set):
lista.append(x)
print(lista[:])
for y in range(0, len(lista)):
for z in range(0, len(lista)):
if y == z:
d = 0
else:
s1 = lista[y]
s2 = lista[z]
print(s1,s2)
print(s1.endswith(s2))
if s1.endswith(s2):
w = w + 1
else:
d = 0
print(w)
return w > 0
#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"
Jan. 1, 2016