Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
list index solution in Clear category for Boolean Algebra by Matvey127
def boolean(x, y, operation):
return int([lambda x, y: x & y,
lambda x, y: x | y,
lambda x, y: (not x) | y,
lambda x, y: x ^ y,
lambda x, y: x == y][
['conjunction', 'disjunction', 'implication', 'exclusive', 'equivalence'].index(operation)](x, y))
Sept. 20, 2019