Append Key and Value to a Key Value pair Dictionary Python
<p>My intended goal is to append a key value pair to a value in inside of a dictionary:</p>

<p>I have the following:</p>

<pre><code>crucial = {'C': {'C': 0, 'B': 1}}
done = {}
for each in crucial:
    for i in each:
        done['D'] = 0
        print(done)
        print(crucial[i].append(done))
</code></pre>

<p>The output is:</p>

<pre><code>  Traceback (most recent call last):
  File "C:\Users\User\Documents\Programming Full-Stack\Python\Exercise Files\02 Quick Start\conditionals.py", line 13, in &lt;module&gt;
    print(crucial[i].append(done))
AttributeError: 'dict' object has no attribute 'append'
{'D': 0}
</code></pre>

<p>Expected output:</p>

<pre><code>{'C': {'C': 0, 'B': 1, 'D':0}}
</code></pre>

<p>Therefore, can anyone provide me a guideline to append a key value pair to that value field in the outer dictionary?</p>

<p>Different approaches tried:  So far I've tried converting the dictionary to a list declaring d as [], not with {}. I also tried putting .extend instead of .append. But in none of those cases I've got the result I wanted.</p>

<p>Thank you in advance</p>