Comment

juanpi

f1 apparently doesn't work on lists of tuples.
It would be nice to have a generalized version.

[(0, 1), (1, 2), (3, 2), (2, 1), (2, 0), (2, 3), (1, 0), (0, 2)]

Replies

lapo3399

This seems to work on any list, including one of lists or tuples:

[[elem,already.append(elem)][0] for elem in thisList if elem not in already]

Now, I'm not sure if it's bad practise to call a function in there sneakily like that, but it works ;).