Most common elements occurring more then `n` times
(lst, n=3)
| 23 | |
| 24 | |
| 25 | def most_common(lst, n=3): |
| 26 | """Most common elements occurring more then `n` times |
| 27 | """ |
| 28 | from collections import Counter |
| 29 | |
| 30 | c = Counter(lst) |
| 31 | return [k for (k, v) in c.items() if k and v > n] |
| 32 | |
| 33 | |
| 34 | def multi_filter_str(flt): |