title: Pyyaml conditional statement
body: <p>In the below code, I need to give more than one case name.
  For example: Giving &quot;login&quot; and &quot;deploy&quot; casenames
  <strong>if j[&quot;case_name&quot;] == &quot;login&quot; and &quot;deploy&quot;</strong>
  And then change enabled value for both to <strong>False</strong> Is it possible ? or there is some other way where I can change enabled value to false for more than one casename.</p>
  <pre><code>    import yaml
  
  y = yaml.safe_load(open(&quot;data.yaml&quot;, &quot;r&quot;)) 
  
  for i in y[&quot;tiers&quot;]:
      for j in i[&quot;testcases&quot;]:
          if j[&quot;case_name&quot;] == &quot;login&quot;:
              j[&quot;enabled&quot;] = False
  
  yaml.dump(y, open(&quot;new_data.yaml&quot;, &quot;x&quot;))
  
  
  
  
  
  Below  is the content from YAML file
      tiers:
      -
          name: testing
          order: 1
          description: ''
          testcases:
              -
                  case_name: deploy
                  project_name: project
                  enabled: true
                  criteria: 100
                  blocking: false
                  clean_flag: false
                  description: ''
                  run:
                      name: 'deploy'
      
              -
                  case_name: login
                  project_name: project
                  enabled: true
                  criteria: 100
                  blocking: false
                  clean_flag: false
                  description: ''
                  run:
                      name: 'login'
  </code></pre>