how to remove duplicate values in list using python code example
Example 1: python remove duplicates from list
# remove duplicate from given_list using list comprehension
res = []
[res.append(x) for x in given_list if x not in res]
Example 2: sort and remove duplicates list python
myList = sorted(set(myList))