title: Python YAML: Controlling output format
body: <p>My file reads user input (like userid, password..). And sets the data to x.yml file.</p>
  
  <p>The content of x.yml file is </p>
  
  <pre><code>{user: id}
  </code></pre>
  
  <p>But instead I want the content to be as</p>
  
  <pre><code>user: id
  </code></pre>
  
  <p>How can I achieve this?</p>