refactoring

This commit is contained in:
frankknoll
2023-04-13 00:47:09 +02:00
parent a715dc6cab
commit bf282e4dac
4 changed files with 50 additions and 26 deletions

View File

@@ -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