I have some different number in here. It changes every time. I need to create a multidimensional array like
array[x][y] => x should include value by splitting before , and y should include ' ' empty.
How can i do that ? Thank you.
dat.xyz
2,3,4,5,6,7,8,9 2,3,4,5,6,7,8,9 2,3,4,5,6,7,8,9 2,3,4,5,6,7,8,9
output = open('dat.xyz', 'r') # See the r
output_list = output.read().strip().split(',')
I can find number before , but it shows in just one line. However, I want to do that multidimensional. It should split dimension to see empty ' '. Thank you.
Output should be following
[[2, 3, 4, 5, 6, 7, 8, 9],
[2, 3, 4, 5, 6, 7, 8, 9],
[2, 3, 4, 5, 6, 7, 8, 9],
[2, 3, 4, 5, 6, 7, 8, 9]]