Is it possible to get which values are duplicates in a list using python?
I have a list of items:
mylist = [20, 30, 25, 20]
I k
The following list comprehension will yield the duplicate values:
[x for x in mylist if mylist.count(x) >= 2]