0

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.

b84ur
  • 1
  • 1

0 Answers0