How To Build Logic In Python