Given nested dict and list of keys, return value. Example: {"a":{"b":5}}, ["a","b"] => 5
Implement this function:
def nested_dict_access(d: dict, keys: list):
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: d, keys.
Input
{'a': {'b': 5}}
['a', 'b']
Output
5