list comprehention

markscala at gmail.com markscala at gmail.com
Thu Jan 19 12:11:25 EST 2006


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])




More information about the Python-list mailing list