title: Removing key value pair from yaml dictionary in python
body: <p>We would like to remove the key and the values from a YAML file using python, for example</p>
  
  <pre><code>- misc_props:
    - attribute: tmp-1
      value: 1
    - attribute: tmp-2
      value: 604800
    - attribute: tmp-3
      value: 100
    - attribute: tmp-4
      value: 1209600
    name: temp_key1
    attr-1: 20
    attr-2: 1
  - misc_props:
    - attribute: tmp-1
      value: 1
    - attribute: tmp-2
      value: 604800
    - attribute: tmp-3
      value: 100
    - attribute: tmp-4
      value: 1209600
    name: temp_key2
    atrr-1: 20
    attr-2: 1
  </code></pre>
  
  <p>From the above example we would like to delete the whole bunch of property and where key name matches the value, for example if we want to delete name: temp_key2 the newly created dictionary after delete will be like below:-</p>
  
  <pre><code>- misc_props:
    - attribute: tmp-1
      value: 1
    - attribute: tmp-2
      value: 604800
    - attribute: tmp-3
      value: 100
    - attribute: tmp-4
      value: 1209600
    name: temp_key1
    attr-1: 20
    attr-2: 1
  </code></pre>