How can I find the duplicates in a Python list and create another list of the duplicates? The list only contains integers.
One line solution:
set([i for i in list if sum([1 for a in list if a == i]) > 1])