python line separated values in a text when converted to list, adds "\n" to the elements in the list
<p>I was astonished that a thing this simple has been troubling me. Below is the code</p>

<pre><code>list = []
f = open("log.txt", "rb")  # log.txt file has line separated values, 


for i in f.readlines():
    for value in i.split(" "):
        list.append(value)

print list
</code></pre>

<p>The output is </p>

<pre><code>['xx00', '\n', 'xx01in', '\n', 'xx01na', '\n', 'xx01oz', '\n', 'xx01uk', '\n']
</code></pre>

<p>How can I get rid of the new line i.e. '\n'?</p>
