I'm given coordinates for nested n-dimensional lists, in which I have to insert a certain value.
Something like (3,1,4) for a 3-D list or (3,1,4,1) for a 4-D list. The proper way to change this value would be:
mylist[3][1][4] = 'x'
mylist[3][1][4][1] = 'y'
It's easy to do this if I always know how many dimensions the list is, but I have to do this for any n. I'm also not allowed to import anything(lab assignment).Thanks!