title: How to read integers from a file in Python
body: <p>So I have a file that looks like this</p>
  
  <pre class="lang-none prettyprint-override"><code>2
  3
  1  2  3  4  5  6
  </code></pre>
  
  <p>So I need to read this file in three separate variables. For the first two I use something like this:</p>
  
  <pre><code>guests = int(input_file.readline())
  length = int(input_file.readline())
  </code></pre>
  
  <p>But for the third line I need a list, how do I transform that to an integer, I've tried this:</p>
  
  <pre><code>sticks = input_file.readline()
  sticks = [int(i) for i in sticks]
  </code></pre>
  
  <p>But it gives me an error: <code>invalid literal for int() with base 10</code></p>