I have a key-value pair say:
key = "a-b-c-d"
value = 10
using the below command I can convert the key to a list.
my_list=key.split("-")
so my_list will be like
my_list=['a', 'b', 'c', 'd']
and I want to convert it into a map to have the final output in variable "my_dict" as
my_dict = {'a':{'b':{'c':{'d':10}}}}
so that when I print this
print(my_dict['a']['b']['c']['d'])
10