Getting an item from a nested dictionary using a list of indexes - python : <p>I have an odd question. If I were to have a dictionary like so:</p>

<pre><code>{"foo":{"abc":123},"bar":{"def":456},"biz":789}
</code></pre>

<p>and I had a list of indexes like so:</p>

<pre><code>["foo","abc"]
</code></pre>

<p>How would I GET AND MODIFY that item? I've seen questions like it, but all the answers tell me to make a bunch of indexes ex:</p>

<pre><code>foobar["foo"]["abc"] = "modified"
</code></pre>

<p>But the problem is that my indexes are in lists. Also, I could do something like ["foo","abc","more","items"] and that would need to equate to foobar["foo"]["abc"]["more"]["items"]</p>

<p>Is there some way that I could get and modify an item in a dictionary using a list of indexes?</p>
