In order to avoid repetition, I would like to do something like this:
a, b = True, False
l = list()
for op in [and, or, xor]:
l.append(a op b)
I tried import operator and also itertools, but they do not contain logical operators, just math and some other ones.
I could not find any previous answer that was helpful!