Open this example in the interactive library
Source code
from collections import Counter
ids = ['A2', 'B1', 'A2', 'C9']
counts = Counter(ids)
print([key for key, n in counts.items() if n == 1])
print([key for key, n in counts.items() if n > 1])
Sample output
['B1', 'C9'] ['A2']
