def compare(arr1, arr2):
    """Compares two arrays - arr1 and arr2. Returns tuple (items that lack from arr2, items that lack from arr1)"""
    attached, detached = [item for item in arr1 if item not in arr2], [item for item in arr2 if item not in arr1]
    return attached, detached