Python Function Finding Prime Implicants