# your code goes here
def is_in_list(word, word_list):
for row in word_list:
if word in row and word != row:
return True
return False
def get_word(word, is_removed):
if is_removed is not True:
return word
def remove(word_list, is_removed):
for word, is_removed in zip(word_list, is_removed):
if is_removed is False:
yield word
word_list = ['abc','abcd','bcd','bbt','yyf','zat']
is_removed = map(is_in_list, word_list, [word_list for row in range(len(word_list))])
result = remove(word_list, is_removed)
print(list(result))
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCmRlZiBpc19pbl9saXN0KHdvcmQsIHdvcmRfbGlzdCk6CiAgICBmb3Igcm93IGluIHdvcmRfbGlzdDoKICAgICAgICBpZiB3b3JkIGluIHJvdyBhbmQgd29yZCAhPSByb3c6CiAgICAgICAgICAgIHJldHVybiBUcnVlCiAgICByZXR1cm4gRmFsc2UKCmRlZiBnZXRfd29yZCh3b3JkLCBpc19yZW1vdmVkKToKICAgIGlmIGlzX3JlbW92ZWQgaXMgbm90IFRydWU6CiAgICAgICAgcmV0dXJuIHdvcmQKCmRlZiByZW1vdmUod29yZF9saXN0LCBpc19yZW1vdmVkKToKICAgIGZvciB3b3JkLCBpc19yZW1vdmVkIGluIHppcCh3b3JkX2xpc3QsIGlzX3JlbW92ZWQpOgogICAgICAgIGlmIGlzX3JlbW92ZWQgaXMgRmFsc2U6CiAgICAgICAgICAgIHlpZWxkIHdvcmQKCndvcmRfbGlzdCA9IFsnYWJjJywnYWJjZCcsJ2JjZCcsJ2JidCcsJ3l5ZicsJ3phdCddCmlzX3JlbW92ZWQgPSBtYXAoaXNfaW5fbGlzdCwgd29yZF9saXN0LCBbd29yZF9saXN0IGZvciByb3cgaW4gcmFuZ2UobGVuKHdvcmRfbGlzdCkpXSkKcmVzdWx0ID0gcmVtb3ZlKHdvcmRfbGlzdCwgaXNfcmVtb3ZlZCkKcHJpbnQobGlzdChyZXN1bHQpKQ==