Python Logical And Statement C