Returns a list copy in which each item occurs only once (in-order).
(iterable)
| 105 | # so we need to find all possible variations of a pattern. |
| 106 | |
| 107 | def unique(iterable): |
| 108 | """ Returns a list copy in which each item occurs only once (in-order). |
| 109 | """ |
| 110 | seen = set() |
| 111 | return [x for x in iterable if x not in seen and not seen.add(x)] |
| 112 | |
| 113 | def find(function, iterable): |
| 114 | """ Returns the first item in the list for which function(item) is True, None otherwise. |
no test coverage detected
searching dependent graphs…