Python Set Intersection Code