I want to append characters to a string, but want to make sure all the letters in the final list are unique.
Example: \"aaabcabccd\" →
\"aaabcabccd\"
char_seen = [] for char in string: if char not in char_seen: char_seen.append(char) print(''.join(char_seen))
This will preserve the order in which alphabets are coming,
output will be
abcd