Comment

Leigh Gordon

I use this function on a script that needs to work on both version 2.3 and higher versions(and doesn't care about preserving order).

def unique(seq):
try:
return list(set(seq))
except NameError:
return {}.fromkeys(seq).keys()