title: Saving data in vertical column format in Python
body: <p>I am trying to save the list <code>Mean1</code> in vertical column format. I present the current and expected outputs.</p>
  <pre><code>Mean1= [25.482954545454543,
   9.914772727272727,
   5.369318181818182,
   4.545454545454545,
   4.318181818181818,
   4.176136363636363,
   4.119318181818182,
   4.090909090909091,
   4.0625,
   4.0625]
  
  with open('Mean.csv', 'w+') as f: 
      
          f.write(f&quot;Mean1 = {str(Mean1)}\n&quot;)
  </code></pre>
  <p>The current output is</p>
  <p><a href="https://i.stack.imgur.com/mOuWN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mOuWN.png" alt="enter image description here" /></a></p>
  <p>The expected output is</p>
  <p><a href="https://i.stack.imgur.com/hitX2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hitX2.png" alt="enter image description here" /></a></p>