from collections import Counter def get_duplicates(array): c = Counter(array) return [k for k in c if c[k] > 1]