title: Write new line at the end of a file
body: <p>I am working with a numpy array in python. I want to print the array and its properties to a txt output. I want the text output to end with a blank line. How can I do this? </p>
  
  <p>I have tried:</p>
  
  <pre><code># Create a text document of the output
  with open("demo_numpy.txt","w") as text:
      text.write('\n'.join(map(str, [a,shape,size,itemsize,ndim,dtype])) + '\n')
  </code></pre>
  
  <p>And also:</p>
  
  <pre><code># Create a text document of the output
  with open("demo_numpy.txt","w") as text:
      text.write('\n'.join(map(str, [a,shape,size,itemsize,ndim,dtype])))
      text.write('\n')
  </code></pre>
  
  <p>However, when I open the file in GitHub desktop, I still get the indication that the last line of the file is "dtype"</p>