orIntermediate Playground

Logical OR operator; returns True if at least one operand is true

Python Playground
Output
Click "Run" to execute your code

'or' short-circuits: it returns the first truthy value. This is a common pattern for default values, but beware: 0, False, and '' are all falsy.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?