title: Reading In Integers in Python
body: <p>So, my question is simple. I'm simply struggling with syntax here. I need to read in a set of integers, 3, 11, 2, 4, 4, 5, 6, 10, 8, -12. What I want to do with those integers is place them in a list as I'm reading them. n = n x n array in which these will be presented. so if n = 3, then i will be passed something like this 3 \n 11 2 4 \n 4 5 6 \n 10 8 -12 ( \n symbolizing a new line in input file)</p>
  
  <pre><code>n = int(raw_input().strip())
  a = []
  for a_i in xrange(n):
     value = int(raw_input().strip())
     a.append(value)
  
  print(a)
  </code></pre>
  
  <p>I receive this error from the above code code:</p>
  
  <pre><code>value = int(raw_input().strip())
  ValueError: invalid literal for int() with base 10: '11 2 4'
  </code></pre>
  
  <p>The actual challenge can be found here, <a href="https://www.hackerrank.com/challenges/diagonal-difference" rel="nofollow">https://www.hackerrank.com/challenges/diagonal-difference</a> .
  I have already completed this in Java and C++, simply trying to do in Python now but I suck at python. If someone wants to, they don't have too, seeing the proper way to read in an entire line, say " 11 2 4 ", creating a new list out that line, and adding it to an already existing list. So then all I have to do is search said index of list[ desiredInternalList[ ] ]. </p>