row=int(input("Number of rows for two dimensional list please:"))
print("Enter",row,"rows as a list of int please:")
numbers = []
for i in range(row):
numbers.append(input().split())
array=[0]*row
for i in range(row):
array[i]=[numbers]
print(array)
The program inputs are
1 2 3
4 5 6
7 8 9
This program output:
[[[['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]], [[['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]], [[['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]]]
How can I turn into this 2 dimensional array like this
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]