Weird conditional behaviour

image
You’d think print(true and false or true) will print false, but as shown above it does not.

Is that intentional or a bug?

Bonus

image

true and false gets evaluated first which returns false and then it becomes false or true. True wins.

Intentional behaviour.

2 Likes