title: I cannot add list into text files
body: <p><strong>Code</strong>
  <br></p>
  <pre><code>file=open(r&quot;C:\Users\Owner\Documents\Python\Apparel store\Python\Practical File\File Handling\student.txt&quot;,&quot;w&quot;)
  n=1
  while n==&quot;1&quot;:
      l=[]
      rollno=int(input(&quot;Enter rollno:&quot;))
      l.append(rollno)
      name=input(&quot;Enter name:&quot;)
      l.append(name)
      file.writelines(l)
      n=int(input(&quot;Enter 1 to add more record(s):&quot;)
  file.close()
  </code></pre>
  <p><strong>Output</strong>
  <br>
  RESTART: C:\Users\Owner\Documents\Python\Apparel store\Python\Practical File\File_handling.py</p>
  <br>
  **Issue**
  <br>
  *I cannot enter list into text files using write mode, I dont receive any errors, just the above output.*
  <br>
  *I have noticed that the output does not include* `student.txt` *in the directory of the output, how do I solve this?*  <br>
  <pre><code>`RESTART: C:\Users\Owner\Documents\Python\Apparel store\Python\Practical File\File_handling.py`
  </code></pre>