title: How to iterate over a nested dictionary and check if a key exists from a list
body: <p>I have a list and a dictionary .
  I need to pick the values from the list and find in dictionary and get the value of that key.if the key is present in dictonary return the value of the key</p>
  
  <pre><code>input_key= ['d0_f1','d1_f1','d1_f2','d3_f1']
  
  
  dict = { 
                        "d0" : 
                       {
                         "d0_f1":"d0_v1",
                         "d3_f1" :"d3_v1"
                       },
                       "d1" : 
                       {
                         "d1_f1":"d1_v1",
                         "d1_f2" :"d1_v2"
                       }
              }
  
  for key in input_key:
      key_value = key    
      for key in dict:
          if key == key_value:
          value1 = dict[key]
          print(value1)
  </code></pre>