title: How do I capture a matrix from a user input and print it out as the user input it?
body: <p>I'm messing around with numpy trying to create a 3x3 matrix. I want to capture the matrix input via user input and then print the matrix out as the user entered it.</p>
  <p>Here's what I have now, it throws a</p>
  <pre><code>ValueError: invalid literal for int() with base 10: 
  </code></pre>
  <p>when I run it and I have no idea why. I'm not entering the letter &quot;a&quot; anywhere, only numbers.</p>
  <pre class="lang-py prettyprint-override"><code>def matrix():
      row = int(3)
      column = int(3)
      matrix_input = []
      print(&quot;Enter the entries in a single line (separated by space): &quot;)
      for i in range(row):  # A for loop for row entries
          entries = []
          for j in range(column):  # A for loop for column entries
              entries.append(int(input()))
          matrix_input.append(entries)
  
      # matrix_input = np.array(entries).reshape(row, column)
      print(matrix_input)
  </code></pre>
  <p>The goal is to get the user to input 3 numbers on three separate lines.
  Example:</p>
  <pre><code>130
  304
  603
  </code></pre>
  <p>The program would then type this back out exactly as the user entered it and in the same format.</p>
  <pre><code>130
  304
  603
  </code></pre>
  <p>Any guidance would be much appreciated. Thanks</p>