I have this dictonary, does not matter the content and I'm trying to set the value by an array of keys like:
dict = {}
path = ['key','second','third']
value = 4
dict[path[0]][path[1]][path[2]] = value
But for any length of the path array.
I have this dictonary, does not matter the content and I'm trying to set the value by an array of keys like:
dict = {}
path = ['key','second','third']
value = 4
dict[path[0]][path[1]][path[2]] = value
But for any length of the path array.