title: Creating a new file in Python
body: <p>I am a beginner, writing a python script in which I need it to create a file that I can write information to. However, I am having problems getting it to create a new, not previously existing file. </p>
  
  <p>for example, I have:</p>
  
  <pre><code>file = open(coordinates.kml, 'w')
  </code></pre>
  
  <p>which it proceeds to tell me:</p>
  
  <pre><code>nameerror: name 'coordinates' is not defined. 
  </code></pre>
  
  <p>Of course it isn't defined, I'm trying to make that file. 
  Everything I read on creating a new file says to take this route, but it simply will not allow me. What am I doing wrong?</p>
  
  <p>I even tried to flat out define it...</p>
  
  <pre><code>file = coordinates.kml
  file_open = open(file, 'w')
  </code></pre>
  
  <p>... and essentially got the same result. </p>