for i in range(len(a)):
    for j in range(len(a)):
        print('item%d has %d same values as item%d' % (i, len(set(a[i]) &
            set(a[j])), j))
how to compare one item in a list with all the other items in this list, python