Split list in python
<p>I have following list:</p>

<pre><code>mylist = ['Hello,\r', 'Whats going on.\r', 'some text']
</code></pre>

<p>When I write "mylist" to a file called file.txt</p>

<pre><code>open('file.txt', 'w').writelines(mylist)
</code></pre>

<p>I get for every line a little bit text because of the \r:</p>

<pre><code>Hello,
Whats going on.
some text
</code></pre>

<p>How can I manipulate mylist to substitute the <code>\r</code> with a space? In the end I need this in <code>file.txt</code>:</p>

<pre><code>Hello, Whats going on. sometext
</code></pre>

<p>It must be a list.</p>

<p>Thanks!</p>
