Skip to content

Instantly share code, notes, and snippets.

@lttzzlll
Created July 27, 2018 13:03
Show Gist options
  • Save lttzzlll/2912e6fcf176a4c460fc9c525b3d0c2c to your computer and use it in GitHub Desktop.
Save lttzzlll/2912e6fcf176a4c460fc9c525b3d0c2c to your computer and use it in GitHub Desktop.
from operator import xor
from functools import reduce
a = [2,3,3,2,1]
r = reduce(xor, a, 0)
# r = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment