I have observed the following behavior in python 3:
>>> ([False, True] and [True, True])
[True, True]
>>> ([False, True] or [True, True])
[False, True]
I was expecting exactly the opposite:
[False, True] and [True, True] = [False and True, True and True] = [False, True]
[False, True] or [True, True] = [False or True, True or True] = [True, True]
How does the observed behavior makes sense and how can I achieve the desired behavior?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…