Forget about the comparison to 'a' for a second and just look at what the right hand side returns.
Returns 'b'
Returns 'a'.
So your first two examples simplify down to:
Code:
'a' == 'b'
'a' == 'a'
In which case it should be clear why the first is False but the second is True.
In a bigger sense, what you're doing is confusing you because you're conflating multiple concepts (boolean logic, short circuiting, and truth-y values).
An 'or' is going to return the first 'True' value it finds because thats all it needs to evaluate. In this case both 'a' and 'b' qualify as True-ish values for Python.
For your 'and' case, every condition is evaluated and so the last of 'a' and 'b' is returned.