I have list of elements like a=[0,1,2,3]
, I want to convert these list elements into multidimensional dictionary a[0][1][2][3]
is it possible using python.
i.e input a=[0,1,2,3]
and desired output a[0][1][2][3]
I have a function that call the a[0] if list contains a=[0]
, a[0][1] if list contains a=[0,1]
and a[0][1][2] if list contains a=[0,1,2]
elements.
I have elements of the list but not able to call my function according to my need.
I don't want to use numpy package, I there any easy method?