title: How to delete a session variable in django?
body: <p>my session variable is 'cart':</p>
  
  <pre><code>cart = {'8': ['a'], ['b'], '9': ['c'], ['d']}
  </code></pre>
  
  <p>if I want to delete all my cart variable I just do this in Python:</p>
  
  <pre><code>del request.session['cart']
  </code></pre>
  
  <p>but I just want to delete key '8', so I try this but it doesn't work:</p>
  
  <pre><code>del request.session['cart']['8']
  </code></pre>
  
  <p>however if I print request.session['cart']['8'] and get <strong>a, b</strong></p>