Answers for "how to xor two element in python"

0

how to xor two element in python

>>> from functools import reduce
>>> from operator import xor
>>> bits = ('0', '1', '0', '1', '0', '1', '0')
>>> reduce(xor, map(int, bits))
1
Posted by: Guest on May-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language