title: Python: how to have character "\n" without have another row in file
body: <p>I was able to print in a file with python.
  I have a dictionary with this form:</p>
  
  <pre><code>dict['name']=x
  dict['list']="\n".join(mylist)
  </code></pre>
  
  <p>When I print on file I don't have a single row but I have the same number as number of "\n".</p>
  
  <p>How can I have a file of this form:</p>
  
  <pre><code>name1 item1
        item2
        item3
  name2 item1
        item2
  name3 item1
        item2
  </code></pre>
  
  <p>...</p>
  
  <p>Thanks for answers</p>
  
  <p>Edit with that code I have this:</p>
  
  <pre><code>name1 item1
  item2
  item3
  name2 item1
  item2
  name3 item1
  item2
  </code></pre>
  
  <p>Intead I want the same that I have when in excel I press ALT + ENTER</p>
  
  <p>Edit2:</p>
  
  <p>If I have a CSV file I want this:</p>
  
  <pre><code>CELL A:1 with name1
  CELL B:1 with item1\nitem2\nitem3
  CELL A:2 with name2
  CELL B:2 with item\nitem2
  ...
  </code></pre>