title: rstrip not working as expected (Python 2.7)
body: <p>I have the following code:</p>
  
  <pre><code>file = open("file", "r")
  
  array = file.readlines()
  
  stats = [1, 1, 1, 1, 1] # creating an array to fill
  
  print array
  
  sh1 = array[1] # breaking the array extracted from the text file up for editing
  
  sh2 = array[2]
  
  sh3 = array[3]
  
  sh4 = array[4]
  
  stats[0] = string.rstrip(sh1[1])
  
  stats[1] = string.rstrip(sh2[1])
  
  stats[2] = string.rstrip(sh3[1])
  
  
  stats[3] = string.rstrip(sh4[1])
  
  print stats
  </code></pre>
  
  <p>I was expecting it to strip the newlines from the array extracted from the text file and place the new data into a separate array. What is instead happening is I'm having a seemingly random amount of characters stripped from either end of my variables. Please could someone explain what I've done wrong?</p>