feat: Add is_subset utility
This commit is contained in:
parent
9e19641fa4
commit
505a55474a
1 changed files with 4 additions and 0 deletions
|
|
@ -964,3 +964,7 @@ def get_source_value(source, key):
|
|||
return source.get(key)
|
||||
else:
|
||||
return getattr(source, key)
|
||||
|
||||
def is_subset(list_a, list_b):
|
||||
'''Returns whether list_a is a subset of list_b'''
|
||||
return len(list(set(list_a) & set(list_b))) == len(list_a)
|
||||
Loading…
Add table
Reference in a new issue