Try To Be Tricky...

X and Y are sequences. Construct a sequence Z which contains each element from X and Y, but only once each.

Z = dict([(t, 1) for t in X + Y]).keys()

Advantages

  • Gives the same answer as the first attempt.

  • Is a statement, so can be used in a lambda construction.

  • Looks pretty darn sexy!