0

How to remove duplicate elements from a list , Example :my_list =[2,5,7,9,10,4,2,9] I want to display only the unique elements and not the recurring elements ..

1 Answers1

0

like this:

list1 = [2,5,7,9,10,4,2,9]
list2 = list(dict.fromkeys(list1))
print(list2)