def foo(a):
	return filter(lambda x: a.count(x) > 1, a)
	
print foo([5, 8, 5, 5, 8, 4])