I do have a list as given below -
keyList1 = [\"Person\", \"Male\", \"Boy\", \"Student\", \"id_123\", \"Name\"]
value1 = \"Roger\"
How can I ge
I am trying to dealing with similar stuff, so I can suggest some guidelines, but again I am naive in Python, so this is just a guideline...
you have a list of keys , so you can definitely start with a loop iterating for each value and then assign the value
like
for i in keylist:
if type(keylist[i]) == dict:
do something
else:
keylist[i] = {}
in the do something, you need to increment i and change index to [i][i+1] and then follow the same untill i+n = len(keylist)