News for hackers. Stuff that matters.
Re:Stack Overflow: the Blind Leading the Blind by thorax on Sunday August 31, 2008 @09:35PM (#291634)
First thing that came to mind for me (just assuming there was needed a practical way to do it) was the following (translated into Python):

  # associative array / dict / hash
  store = {}
  for elem in inputlist:
    if elem in store:
      del store[elem]
    else:
      store[elem] = True
  # return the only key left
  return store.keys()[0]
Now that I've looked at the post, the XOR approach is quite efficient and a more fun answer.

There are no comments on this comment yet.