Python entfernen Sie Duplikate aus der Liste
mylist = ["a", "b", "b", "c", "a"]
mylist = sorted(set(mylist))
print(mylist)
mylist = ["a", "b", "b", "c", "a"]
mylist = sorted(set(mylist))
print(mylist)
mylist = ["a", "b", "a", "c", "c"]
mylist = list(dict.fromkeys(mylist))
print(mylist)
# remove duplicate from given_list using list comprehension
res = []
[res.append(x) for x in given_list if x not in res]
mylist = ["a", "b", "a", "c", "c"]
mylist = list(dict.fromkeys(mylist))
duplicate = [2, 4, 10, 20, 5, 2, 20, 4]
print(list(set(duplicate))
word = input().split()
for i in word:
if word.count(i) > 1:
word.remove(i)