Question: I'd appreciate help for this apparently simple task: write a function that will take a tuple and return a nested dictionary, with each successive value in the tuple being a key in a successively deeper 'layer' of the dictionary.  

The ultimate 'value' at the bottom of the rainbow is specified (say 10, in the following example).

So from the tuple `('cat', 'dog', 'bone')`, I'm aiming to have as an output: 

```
{'cat':{'dog':{'bone':10}}}

```

and to do this for tuples of arbitrary length.

Answer: 
How is that 'ultimate value' specified exactly? 

In the code below it is specified by named argument:

```
def nested_dict(tuple, value=10):
    if len(tuple) is 1:
        return { tuple[0] : value }
    return { tuple[0] : nested_dict(tuple[1:], value=value) }

```
My attempt as well:

```
>>> t = ('cat', 'dog', 'bone')
>>> last = {t[-1]: 10}
>>> for e in t[1::-1]:
...     last = {e: last}
... 
>>> last
{'cat': {'dog': {'bone': 10}}}

```