Conditions | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Filters for working with data structures, munging, etc...""" |
||
4 | def filter_list(lst, vals): |
||
5 | """Filter a list by vals. |
||
6 | |||
7 | Args: |
||
8 | lst (dict): The dictionary to filter. |
||
9 | |||
10 | Returns: |
||
11 | string (dict): The filtered dict. |
||
12 | """ |
||
13 | if any([not lst, not isinstance(lst, list), not isinstance(vals, list)]): |
||
14 | return lst |
||
15 | return list(set(lst).difference(set(vals))) |
||
16 | |||
54 |