from operator import itemgetter


def list_unique(hasDupes):
    """Return the sorted unique values from a list"""
    # order preserving
    d = dict((x, i) for i, x in enumerate(hasDupes))
    return [k for k, _ in sorted(d.items(), key=itemgetter(1))]