title: Can anyone why this code is returning an "invalid syntax" error?
body: <p>In a project I am currently doing in Python 3, one of the tasks that I must do is to take in multiline input and put it into a list, each line of input itself in lists(my way of separating the different inputs; I format them in the needed data types later, but that's beyond the scope of this question); I achieve this using the following code:</p>
  
  <pre><code>inputs = []
  i = input()
  while i != '':
    inputs.append([s for s in i.split(" ")] 
    i = input()
  # example for this code:
  # An input such as
  # "3 7 5 9
  # 2 4 6 8
  # 2 1 4 5"
  # would end up with inputs = [["3", "7", "5", "9"], ["2", "4", "6", "8"], ["2", "1", "4", "5"]]
  </code></pre>
  
  <p>When I ran the code in full, I got the error:
  <code>line 38 i = input() ^ SyntaxError: invalid syntax</code>(referring to the <code>i = input()</code> inside the loop.)</p>
  
  <p>Can anyone explain to me why this occurs?</p>