Q:

([False, True] and [True, True]) evaluates to [True, True]

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?

A:

Each list is being evaluated as a whole.  [False, True] is True, and so is [True, True] because only an empty list is False.
and returns the last True element, but or returns the first one.

A:

Python does not provide element-wise operations on lists. You can use list comprehensions:
l1 = [False, True] 
l2 = [True, True]
[x and y for x,y in zip(l1, l2)]
#[False, True]

Note that the np.bitwise_and recommended elsewhere is about an order of magnitude slower.

A:

You want to use numpy. Standard lib python is evaluating:
bool([False, True]) and bool([True, True])

Since both are True, it selects the last (try out 1 and 2)
if you did:
import numpy
numpy.bitwise_and([False, True], [True, True])

You'll get what you want.
If you don't want to use numpy, you need to write a list comprehension or loop:
result = [(x and y) for x, y in zip([False, True], [True, True])]

