Comparing two different string

a = “Ab”
b=“byg”
a and b
it is showing output it is showing second output
in or
a or b
it is showing first output
what is the logic behind it

you can use the double equal sign"==" —>Rational Operators
OR

you can use the “is” and “is not” functions