some_list = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]
#Convert to set and then back to list
uniq_list = list(set(some_list))
print(uniq_list)
# => [1, 2, 3, 4, 5]
-Delete / extract duplicate elements from list (array) with Python \ | note \ .nkmk \ .me
Recommended Posts