python remove all double elements from list

Solutions on MaxInterview for python remove all double elements from list by the best coders in the world

showing results for - "python remove all double elements from list"
Paulina
30 Jun 2017
1seen = {}
2new_list = [seen.setdefault(x, x) for x in my_list if x not in seen]
3
Marie
09 Jun 2018
1new_list = list(set(my_list))
2