title: How to save a file with python in different location?
body: <p>I am creating a file with the help of python programming language in my hard drive. The code I am using is:</p>
  
  <pre><code>file = open('test.txt','w')
  
  file.write('Blah Blah')
  
  file.close()
  </code></pre>
  
  <p>This code creates <code>test.txt</code> file in hard drive but the file is saved in the default location of project. I want to save the file in other location like desktop or somewhere else. Can anyone tell me how to do this.</p>
  
  <p>I am using python 3.5</p>
  
  <p>Thanks in Advance,</p>