title: Python readlines() splits line into two
body: <p>I'm reading lines from a text file. In the text file there is a single word in each line. I can read and print the word from the file, but not the whole word is printed out on one line. The word is split into two. The letters of the printed word are mixed.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import random
  fruitlist = open('fruits.txt', 'r')
  
  reading_line = fruitlist.readlines()
  word = random.choice(reading_line)
  mixed_word = ''.join(random.sample(word,len(word)))
  
  print(mixed_word)
  
  fruitlist.close()
  </code></pre>
  
  <p>How can I display one word on a line?</p>
  
  <p>EDIT:</p>
  
  <p>this is the content of the text file:</p>
  
  <pre><code>pinapple    
  pear    
  strawberry    
  cherry    
  papaya  
  </code></pre>
  
  <p>The script should print one of these words (with their letters mixed) like this:</p>
  
  <pre><code>erpa
  </code></pre>
  
  <p>(This would be the equivalent of pear)</p>
  
  <p>Right now it is displayed like this:</p>
  
  <pre><code>erp  
  a
  </code></pre>