title: writing text file with line breaks
body: <p>I want to write a text file where many lines are created, so I want to know how to put each value on a new line.</p>
  
  <p>this is my code:</p>
  
  <pre><code>import itertools
  from itertools import permutations , combinations
  lista=[]
  
  splits=itertools.permutations('0123456789', 5)
  for x in splits:
      lista.append(x)
  
  f=open('lala.txt', 'w')
  for i in lista:
      f.write(str(i))
  </code></pre>
  
  <p>in this part I need to put the line break: <code>f.write(str(i))</code></p>
  
  <p>I have tried with: <code>f.write(str(i)\n)</code> but gives me an error</p>