Write a script for your pair of arrays to find their union (all the elements), intersection(elements in both, not just one), or difference (in one but not both). code example
Example: can we calculate the intersection of duplicate ele
from collections import Counter
c = list((Counter(a) & Counter(b)).elements())