In Python list, remove duplicates by: char_list = ["a", "a", "a", "b", "c"] char_list = list(dict.fromkeys(char_list)) print(char_list) Output: ['b', 'a', 'c'] Or if you care about the ordering, do it like this: from collections import OrderedDict...

Markdown supported · ⌘↵ to post
No responses yet.