Op 19 jan 2006 vond "Paddy" <[EMAIL PROTECTED]>: >>>> answer = [ val for val in set(ref) for x in >>>> range(min(lst.count(val), ref.count(val)))] answer > [2, 2, 4]
I don't think it's correct. Your algoritm with the ref and lst below gives 3 as answer. The answer should have been 2 (1,3). ref=[3, 3, 1, 1, 3] lst=[5, 1, 4, 5, 3] -- http://mail.python.org/mailman/listinfo/python-list