How was this evaluated

2 ** 3 == 108 % 100 or ‘Cleese’ == ‘King Arthur’

is it because ‘Cleese’ is a string and ‘King Arthur’ also a string?

OR short-circuits on true, which would be the first operand.

108 % 100  =>  8  =>  2 ** 3  => truthy

The other operand is not evaluated but it is falsy, if we check.

We would only consider the strings if they were operands:

'Cleese' and 'King'   =>  truthy
1 Like

Also, side note, John Cleese didn’t play King Arthur in Monty Python and the Holy Grail.

That role was played by Graham Chapman. :wink:

*and if you’ve never seen the film, I highly recommend it.


Monty Python to ‘them’ is like the advent of the ‘talkies’ to us troglodytes. Nothing so primitive will ever peak their interests. But, my vote is on “Life of Brian” when it comes down to it.


thanks i now understand

1 Like

Which is…sad. MP is classic. :parrot:

I just meant that if one had background knowledge then it’s an easy question bc
‘Cleese’ == ‘King Arthur’ is False :smiley: