def set_compare(a, b):
    """
    Compare two iterables a and b. set() is used for comparison, so only
    unique elements will be considered.

    Parameters
    ----------
    a : iterable
    b : iterable

    Returns
    -------
    tuple with 3 elements:
        (what is only in a (not in b),
         what is only in b (not in a),
         what is common in a and b)
    """
    a, b = set(a), set(b)
    return (a-b, b-a, a.intersection(b))