Given a list of strings I want to remove the duplicates and original word.
For example:
lst = [\'a\', \'b\', \'c\', \'c\', \'c\', \'d\', \'e\', \'e\']
You could make a secondary empty list and only append items that aren't already in it.
oldList = ['a', 'b', 'c', 'c', 'c', 'd', 'e', 'e'] newList = [] for item in oldList: if item not in newList: newList.append(item) print newList
I don't have an interpreter with me, but the logic seems sound.