title: Get new dict from old dict with condition?
body: <p>I am an dictionary (Dictionary of dictionary)</p>
  
  <pre><code>    old_dict = {
      '1':{'A':1, 'check': 0, 'AA':2, 'AAA':3 , 'status':0},
      '2':{'A':11,'check': 0, 'AA':22, 'AAA':33 ,'status':1},
      '3':{'A':111,'check': 0, 'AA':222, 'AAA':333 ,'status':0},
      '4':{'A':1111,'check': 1, 'AA':2222, 'AAA':3333 ,'status':0},
      }
  </code></pre>
  
  <p>I Want to get a new dictionary that before['check'] != 0 and before['status'] != 0
  so will be</p>
  
  <pre><code>    new_dict = {
      '1':{'A':1, 'check': 0, 'AA':2, 'AAA':3 , 'status':0},
      '3':{'A':111,'check': 0, 'AA':222, 'AAA':333 ,'status':0},
      }
  </code></pre>
  
  <p>If it's a list I did like this</p>
  
  <pre><code>    ouputdata = [d for d in data if d[1] == ' 0' and d[6]==' 0']
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>for field in old_dict.values():
         if field['check'] !=0 and field['status'] != 0
            line = field['A'] + field['AA']+field['AAA']
           #write these line to file
  </code></pre>
  
  <p>How Make it  with dictionary.
  Could you help me to make it with dictionary</p>