Lits uniques sur Python

my_list  = [1,1,2,3,2,1,5]

# A set contains unique elements of which the order is not important
unique = list(set(my_list))

print(unique)
# Important: initial order might not be respected
# Output: [1,3,2,5]
Mikaël Ferreira de Almeida