So starting with a list of strings, as below
string_list = [\'rest\', \'resting\', \'look\', \'looked\', \'it\', \'spit\']
I wan
Another one liner:
[string for string in string_list if len(filter(lambda x: string in x,string_list)) == 1]
should be fairly readable, just not that pythonic.
Here's an un-optimal way, only use if the lists are small:
for str1 in string_list:
for str2 in string_list:
if str1 in str2:
string_list.remove(str1)