title: How to delete object in a dict by reference from another variable
body: <p>So I have nested dictionary objects</p>
  
  <pre><code>a = {'a':{'b':[1,2,3]}}
  </code></pre>
  
  <p>And I have a reference to the nested 'b':</p>
  
  <pre><code>c=a['a']['b']
  </code></pre>
  
  <p>Now when I call </p>
  
  <pre><code>del c
  print a
  </code></pre>
  
  <p>The results are </p>
  
  <pre><code>{'a':{'b':[1,2,3]}}
  </code></pre>
  
  <p>The variable c is deleted but the object it referenced still exists. I want to delete the nested 'b' object altogether. It is easy to do this with</p>
  
  <pre><code>del a['a']['b']
  </code></pre>
  
  <p>But in the real application of this, the nesting is too deep and this is used too often for that to be feasible.</p>
  
  <p>The question: How do I delete a dictionary tag with only a reference to it in another variable?</p>