def strip_duplicates(values): norm_values, map = normalise_strings(values) new_values = [] for value in norm_values: if value not in new_values: new_values.append(value) return denormalise_strings(new_values, map)
def detect_and_strip_duplicates(values): norm_values, map = normalise_strings(values) new_values = [] for value in norm_values: if value not in new_values: new_values.append(value) else: print values, '. Duplicate was:', value return denormalise_strings(new_values, map)