I\'ve been across a problem in python, the input format of the 2d array to be read is
3 # number of rows and columns of a square matrix 1 2 3 #
If the numbers are separated by a single space your can use the following code:
n = int(input()) matrix = [] for i in range(n): row = [int(x) for x in input().split()] matrix.append(row)
If you have different separator then space you can put as argument in the split() function.
split()