if Statement with Logical Operator in Python