Python Logical Statements Geometry