def removedups2(l): s = set() result = [] for item in l: if item not in s: s.add(item) result.append(item) return result