Per wrote: > how to find the number of common items between two list in linear-time? > Not really sure about linear-time, but you could try the following: >>> a=[1,2,3,4] >>> b=[3,4,5,6] >>> set(a) & set(b) set([3, 4]) --Irmen