If you're a programmer, you can always send me your most cursed code, I enjoy that sort of thing

Given an array of Boolean values and a logical operator, return a Boolean result based on sequentially applying the operator to the values in the array. 

@vaporeon_

logical_calc=lambda l,o,i=__import__:i('functools').reduce(i('operator').__dict__[f'__{o.lower()}__'],l)
Follow

re: Given an array of Boolean values and a logical operator, return a Boolean result based on sequentially applying the operator to the values in the array. 

@monorail @vaporeon_ thanks i hate it (affectionate)

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.