title: How can I print [] without string in Python in YAML file
body: <p>In my yam file I am trying this</p>
  
  <pre><code>with open(fname, "w") as f:
       yaml.safe_dump({'items':['test', 'test2']}, f,
                      default_flow_style=False, width=50, indent=4)
  </code></pre>
  
  <p>It prints in the below format</p>
  
  <pre><code>items:
  - 'test'
  - 'test2'
  </code></pre>
  
  <p>I want the output formatted like below</p>
  
  <pre><code>items: ['test', 'test2']
  </code></pre>
  
  <p>How can I do that ?</p>
  
  <p>EDIT:</p>
  
  <p>This is my complete code</p>
  
  <pre><code>   d = {}        
     for m in ['B1', 'B2', 'B3']:
                  d2 = {}
                  for f in ['A1', 'A2', 'A3']:
                      # here i don't want any flow style
                      d2[f] = ['test', 'test2']
                  d[m] = d2
  
      with open(fname, "w") as f:
          yaml.safe_dump(d, f, default_flow_style=True, width=50, indent=8)
  </code></pre>