title: How can I write data in YAML format in a file?
body: <p>I need to write the below data to yaml file using Python:</p>
  
  <pre><code>{A:a, B:{C:c, D:d, E:e}} 
  </code></pre>
  
  <p>i.e., dictionary in a dictionary. How can I achieve this?</p>