I get a weird result and I try to apply the and
or the or
operator to 2 Boolean lists in python. I actually get the exact opposite of what I was expec
If what you actually wanted was element-wise boolean operations between your two lists, consider using the numpy
module:
>>> import numpy as np
>>> a = np.array([True, False, False])
>>> b = np.array([True, True, False])
>>> a & b
array([ True, False, False], dtype=bool)
>>> a | b
array([ True, True, False], dtype=bool)