title: Taking n number of integer inputs from a single line in python
body: <p>So basically I take an n value with <code>n = int(input("number of boats"))</code> from user, then taking n amount of integer inputs from a single line (let's say my input is <code>2 6 3 6 4 7 4</code> and they wrote <code>2</code>, I'd only take the first two numbers <code>2 6</code>) and appending that into a list (which I define before as <code>mylist = []</code>). I want to have them as integers and not a string in my list. How can I do this?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>Okay perhaps my wording wasn't the best, so I'll try explaining differently. I'm taking an input from a .txt file and the file has:</p>
  
  <p><code>3
  23 56
  36 48
  46 97</code></p>
  
  <p>The <code>3</code> at the start determines how many boats there are, and the <code>23 56</code> for example are values for the first boat. I want to take input that determines how many boats, then take all the values as input and put them all into one list <code>[23, 56, 36, 48, 46, 97]</code>. Note that I have to use input and not file reading because there will be different values tested. I need the values as integers so I can't take every line as a string.</p>