fork(1) download
  1. def checkio(words_set):
  2. for word1 in words_set:
  3. for word2 in words_set:
  4. if word1.endswith(word2):
  5. return True
  6. return False
  7.  
  8. #These "asserts" using only for self-checking and not necessary for auto-testing
  9. if __name__ == '__main__':
  10. assert checkio({"hello", "lo", "he"}) == True, "helLO"
  11. assert checkio({"hello", "la", "hellow", "cow"}) == False, "hellow la cow"
  12. assert checkio({"walk", "duckwalk"}) == True, "duck to walk"
  13. assert checkio({"one"}) == False, "Only One"
  14. assert checkio({"helicopter", "li", "he"}) == False, "Only end"
  15. # your code goes here
Success #stdin #stdout 0.02s 8696KB
stdin
Standard input is empty
stdout
Standard output is empty