Skip to content

Instantly share code, notes, and snippets.

@lttzzlll
Created July 27, 2018 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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