I want to convert this list:
[1,2,3,4,5]
Into this dict:
{ 1 :
{ 2 :
{ 3 :
{ 4 : 5 }}}}
This doesn't sound too complicated but I'm stumped when it's time to assign a value to a key deeper than the surface. I have a recursive function for finding how deep my dictionary goes but I don't know how to tell my algorithm to "add the new key here".