Convert a list of keys and a value to a nested dict. Example: ['a','b','c'], 1 => {'a':{'b':{'c':1}}}
Implement this function:
def list_to_nested(keys: list, value):
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: keys, value.
Input
['a', 'b', 'c']
1
Output
{'a': {'b': {'c': 1}}}