Q: Yielding unique values from a list python i need to yield unique elements for example if i have the list [3,4,5,7,3,9,0,3], i would only yield 3, 4, 5, 7, 9, 0.   
def unique(sequence):
    for i in sequence:
        yield (i) 
    return sequence

I will not iterate 

A: Try this:
list(set(sequence))

This doesn't do any iteration

A: You can use a set to keep track of the items you have yielded and thus keep the items' order, like below:
def unique(sequence):
    yielded = set()
    for i in sequence:
        if i in yielded:
            continue
        yield (i)
        yielded.add(i)

Sample output from given input:
>>> for x in unique([3,4,5,7,3,9,0,3]):
    print(x)


3
4
5
7
9
0
>>> 

