Python Boolean operators return the last value evaluated, not True/False. The docs have a good explanation of this:
The expression
x and yfirst evaluatesx; ifxisfalse, its value is returned; otherwise,yis evaluated and the resulting value is returned.