Fix indexing

This commit is contained in:
Luigi311
2023-04-10 15:17:16 -06:00
parent 916b16b12c
commit 68e3f25ba4
6 changed files with 134 additions and 65 deletions

View File

@@ -39,6 +39,14 @@ def str_to_bool(value: any) -> bool:
return str(value).lower() in ("y", "yes", "t", "true", "on", "1")
# Search for nested element in list
def contains_nested(element, lst):
for i, item in enumerate(lst):
if element in item:
return i
return None
# Get mapped value
def search_mapping(dictionary: dict, key_value: str):
if key_value in dictionary.keys():