Karnaugh Map Method In Python