I am confused with Logical 'And' and 'or' combination in python
I got some idea from Python's Logical Operator And but I couldn't understand combination of 'AND' and 'OR'
a=3
print(a%2 and 'odd' or 'even')
I understood how even was printed if a is 2 ie.,
a= 2, 2%2 = 0 => False.
Then Note String object is considered as True so 'odd' and 'even' are True.
So False and True(odd) or True(even)
will give be False(even)
object.
But when I didn't understand how even works. If 1st object is True
then the output should be immediate True
without checking other condition(or operations), how is it going further and printing 'even'