title: How to make a list of numbers from a txt file in python?
body: <p>I have text file containing the numbers 52, 2,103,592,2090,34452,0,1, but arranged as one column (under each other). I want to import the numbers into python and create a list </p>
  
  <pre><code>L=[52,2,103,592,2090,34452,0,1]
  </code></pre>
  
  <p>The best I have managed to do so far is:</p>
  
  <pre><code>txtfile=open('file.txt')
  
  L=[]
  for line in txtfile:
      L.append(line.rstrip())
  
  print(L)
  </code></pre>
  
  <p>which returns:</p>
  
  <pre><code>L=['52','2','103','592','2090','34452','0','1']
  
  </code></pre>
  
  <p>but the ' around the numbers bother me.</p>
  
  <p>Any help is appreciated.</p>