title: How to read a matrix from a standard input?
body: <p>i'm trying to read the input from the standard input (console) but my code is only reading the first number in the line</p>
  
  <pre><code>x=input("enter the matrix?")
  print(read_matrix(x))
  
  def read_matrix(matrix):
      list_of_lists = []
      for line in matrix:
          new_list = [int(elem) for elem in line.split()]
          list_of_lists.append(new_list)
      return list_of_lists
  </code></pre>