Returns a list copy in which each item occurs only once (in-order).
(iterable)
| 78 | return find(lambda x: x in iterable1, iterable2) is not None |
| 79 | |
| 80 | def unique(iterable): |
| 81 | """ Returns a list copy in which each item occurs only once (in-order). |
| 82 | """ |
| 83 | seen = set() |
| 84 | return [x for x in iterable if x not in seen and not seen.add(x)] |
| 85 | |
| 86 | class Map(list): |
| 87 | """ A stored imap() on a list. |