refactoring
This commit is contained in:
@@ -8,3 +8,9 @@ def fillLst(lst, desiredLen, fillValue):
|
||||
|
||||
def flatten(tuples):
|
||||
return [item for tuple in tuples for item in tuple]
|
||||
|
||||
|
||||
def get_dictWithKeys_dictWithoutKeys(dict, keys):
|
||||
dictWithKeys = {key: dict[key] for key in keys}
|
||||
dictWithoutKeys = {key: dict[key] for key in dict.keys() - keys}
|
||||
return dictWithKeys, dictWithoutKeys
|
||||
|
||||
Reference in New Issue
Block a user