So starting with a list of strings, as below
string_list = ['rest', 'resting', 'look', 'looked', 'it', 'spit']
I want to remove any element from the list that is a substring of another element, giving the result for instance...
string_list = ['resting', 'looked', 'spit']
I have some code that acheives this but it's embarrassingly ugly and probably needlessly complex. Is there a simple way to do this in Python?