code: def distinct(xs):
      
      # don't use collections.OrderedDict because we do support Python 2.6
      seen = set()
      return [x for x in xs if x not in seen and not seen.add(x)]
docs: Get the list of distinct values with preserving order.