title: Multiple Comparison AND and NOT in Python
body: <p>I am newb in Python. I want to make combination of AND and NOT operator, but it didn't work. I expect the result would be True if someone is under or equal to 30 y.o, male, and an Indonesian or Malaysian. I will appreciate your help. You can give another example of AND and NOT combination without If-Else statement. Thanks.</p>
  <pre><code>def job_vacancy_requirements(age, gender, nationality):
      gender = ['male', 'female']
      nationality = ['indonesian', 'australian', 'malaysian']
      return (age &lt;= 30) and (gender == 'male') not (nationality == 'australian')
  print(job_vacancy_requirements(25, 'male', 'indonesian'))
  print(job_vacancy_requirements(30, 'female', 'malaysian'))
  print(job_vacancy_requirements(27, 'male', 'australian'))
  </code></pre>