not — Intermediate Playground
Logical NOT operator; inverts a boolean value
Python Playground
Output
Click "Run" to execute your code'not' always returns a boolean. Use it for readability, but prefer 'is not', 'not in', and '!=' over 'not ... is', 'not ... in', and 'not ... =='.
Challenge
Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?