X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dict_utils.py;h=b1464c6bb9967ce4efa48318a288babd0ff322e9;hb=822454f580c1ff9eb207b8da46cdfae24e30cde1;hp=79c86edf286f2c9ea9983906385365199be74892;hpb=36fea7f15ed17150691b5b3ead75450e575229ef;p=python_utils.git diff --git a/dict_utils.py b/dict_utils.py index 79c86ed..b1464c6 100644 --- a/dict_utils.py +++ b/dict_utils.py @@ -198,9 +198,7 @@ def min_key(d: Dict[Any, Any]) -> Any: return min(d.keys()) -def parallel_lists_to_dict( - keys: List[Any], values: List[Any] -) -> Dict[Any, Any]: +def parallel_lists_to_dict(keys: List[Any], values: List[Any]) -> Dict[Any, Any]: """Given two parallel lists (keys and values), create and return a dict. @@ -211,9 +209,7 @@ def parallel_lists_to_dict( """ if len(keys) != len(values): - raise Exception( - "Parallel keys and values lists must have the same length" - ) + raise Exception("Parallel keys and values lists must have the same length") return dict(zip(keys, values))