A and B
returns A if A is false, or B otherwise:
>>> 0 and 1
0
>>> False and True
False
>>> True and 'yes'
'yes'
>>> True and ''
''
Similarly, 'A or B' returns A if A is true, or B otherwise:
>>> 0 or 1
1
>>> False or True
True
>>> '' or 'yes'
'yes'
>>> False or ''
''
>>> 'yes' or ''
'yes'