title: Iterating through YAML list in python
body: <p>I'm trying to read a YAML file and print out the list I have on there in order of what it is in the file. </p>
  
  <p>So YAML:</p>
  
  <pre><code>b: ...
  a: ...
  </code></pre>
  
  <p>And my python is:</p>
  
  <pre><code>for key, value in yaml.load(open(input_file)).items():
      print(str(key))
  </code></pre>
  
  <p>The output becomes:</p>
  
  <pre><code>a
  b
  </code></pre>
  
  <p>However I need it to be <code>b</code> then <code>a</code>. I've also tried <code>iteritems()</code>, and I get the same result.</p>