What is the logic behind below operations?
and
operator prints only second operand.
>>> print(4 and 3)
3
>>> print(3 and 4)
4
>>> print(1 and True)
True
>>> print(True and 1)
1
>>> print(True and "hello")
hello
or
operator prints only first operand.
>>> print(4 or 3)
4
>>> print(3 or 4)
3
>>> print(1 or True)
1
>>> print(True or 1)
True
>>> print(True or "hello")
True