Question: Given a list of n numbers how can i print each element except the duplicates?

```
d = [1,2,3,4,1,2,5,6,7,4]

```

For example from this list i want to print : 1,2,3,4,5,6,7

Answer: 
If the order does not matter:

```
print set(d)

```

If the type matters (want a list?)

```
print list(set(d))

```

If the order matters:

```
def unique(d):
    d0 = set()
    for i in d:
        if not i in d0:
             yield i
        d0.add(i)

print unique(d)

```
All you have to do is

1. create an array.
2. get list's element.
3. if element exists in array, leave it.
4. and if it does not exists, print it.