a[] = [ 1 2 3 ] b[] = [ 4 5 6 ] c[] = a[] for h in b[] : c[] &= h print c[]