another approach:

ref = [2,2,4,1,1]
lis = [2,2,5,2,4]

len([ref.pop(ref.index(x)) for x in lis if x in ref])

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to