title: Removing non numeric characters from text file Python 3.3
body: <p>I have been given the task to remove all non numeric characters including spaces from a text file and then print the new result next to the old characters for example:</p>
  
  <p>Before:</p>
  
  <pre><code>sd67637 8
  
  ssheiej44
  </code></pre>
  
  <p>After:</p>
  
  <pre><code>sd67637 8 = 676378
  
  ssheiej44 = 44
  </code></pre>
  
  <p>As i am a beginner i do not know where to start with this task. I followed instructions from another user but i wasnt as clear to elaborate this is what i have so far.</p>
  
  <pre><code>text1 = open('/Users/student/Desktop/Harry.txt', 'r')
  data = text1.readlines()
  new_string = ''.join(ch for ch in data if ch.isdigit())
  print(data, '=', new_string)
  </code></pre>
  
  <p>Yet it still doesnt give me the desired effect as shown above. Instead i get this:</p>
  
  <pre><code>    [] = 
  </code></pre>
  
  <p>Could someone please fix this and explain in laymens terms please.</p>