Re:The unknown features of Python's `operator` module
by mikevin on Sunday August 08, 2021 @03:47PM
(#28109515)
> parity = reduce(xor, map(ord, str))%2 Except Python3 took reduce away in favor of more boilerplate. And yes, there are multiple alternative implementations of the above.
You can import functools.reduce to get it back but maybe thats what you meant with more boilerplate
You can import functools.reduce to get it back but maybe thats what you meant with more boilerplate