Python / How to find non-unique elements in a list

You are given a non-empty list of integers (X). Function should return a list consisting of only the non-unique elements in this list. 
Example: [1, 2, 3, 1, 3] 1 and 3 non-unique elements and result will be [1, 3, 1, 3]. 


In the end, data will contain only non-unique items.

No comments:

Post a Comment