title: convert .txt file into a list of integers in python
body: <p>Say, I have a file which has the following content:</p>
  
  <pre><code>1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  </code></pre>
  
  <p>I want create it into a list of integers in Python3, i.e [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]</p>
  
  <pre><code>f = open("stan.txt","r")
  
  myList = []
  
  for line in f:
     myList.append(line)
  
  print(myList)
  
  lst = []
  for i in myList:
      i = i[:-1]
      lst.append(int(i))
  print(lst)
  </code></pre>
  
  <p>It is my verbose code. Is there an elegant and concise way to do it?</p>