Python Logical Operators Precedence