Skip to content

Instantly share code, notes, and snippets.

@FredLoh
Created June 16, 2016 03:10
Show Gist options
  • Save FredLoh/9d9bc48c41644d304eaf870a8f486867 to your computer and use it in GitHub Desktop.
Save FredLoh/9d9bc48c41644d304eaf870a8f486867 to your computer and use it in GitHub Desktop.
input_array = [1,2,3,4,3,2,1]
i = 0
for val in input_array:
i = i ^ val
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment