I have issue with this code.
This code will print the following output.
1 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
But I want that the code prints like this output.
1;2;3;4;
2;4;6;8;
3;6;9;12;
4;8;12;16;
Can someone help me?
Code:
import numpy
info = numpy.zeros((4,4))
info = numpy.array([[ 1, 2, 3, 4], [2, 4, 6, 8], [ 3, 6, 9, 12], [4, 8, 12, 16]])
info2 = info.tolist()
print(info2)
for rivi in info2:
for sarakke in rivi:
print(sarakke, end=" ")
print()
This code will print the following output.
1 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
But I want that the code prints like this output.
1;2;3;4;
2;4;6;8;
3;6;9;12;
4;8;12;16;
Can someone help me?