title: Can't add items to a csv file because of "PermissionError: [Errno 13] Permission denied:"
body: <p>I was trying to add some list of words to a CSV file using python file handling, but it was giving a &quot;PermissionError: [Errno 13] Permission denied:&quot; error. The syntax works for a txt file. Although the file was created, no words were added to it. I tried to check the file properties and it seems okay. I don't know what else to do.</p>
  <p>Here is the code:</p>
  <pre><code>words = (&quot;Almost     every   creative    person  faces   problems    like    procrastination&quot;).split()
  words2= (&quot;perfectionism self-doubt at   one time another Even   the successful  ones&quot;).split()
  words3 = (&quot;But  the feeling of  being   utterly alone   on  your    artist’s    journey insidious It&quot;).split()
  words4 = (&quot;gnaws    at  your    confidence      weakens your    resolve It  causes  talented    writers to&quot;).split()
  
  for word in words:
      word_collect= open('word_collected.csv','w+')
  for word2 in words2:
      word_collect = open ( 'word_collected.csv' , 'w+' )
  for word3 in words3:
      word_collect = open ( 'word_collected.csv' , 'w+' )
  for word4 in words4:
      word_collect = open ( 'word_collected.csv' , 'w+' )
      word_collect.write(str(words))
      word_collect.write ( &quot;\n&quot; )
      word_collect.write ( str ( words2 ) )
      word_collect.write(&quot;\n&quot;)
      word_collect.write ( str ( words3 ) )
      word_collect.write ( &quot;\n&quot; )
      word_collect.write ( str ( words4 ) )
      word_collect.close()
  </code></pre>
  <p>Output:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\Joshua\PycharmProjects\HANGERMAN\venv\Lib\hangerman.py&quot;, line 8, in &lt;module&gt;
      word_collect = open ( 'word_collected.csv' , 'w+' )
  PermissionError: [Errno 13] Permission denied: 'word_collected.csv'
  </code></pre>