Open nanaa9 opened 6 years ago
You'd have to do the ol' lists in lists thing, where the numbers in the list would represent the columns, and the lists would represent the rows.
if you wanted something like this:
0 0 0 0
0 0 0 0
0 0 0 0
your list would look like:
matrix = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
and you could print it out by running it through a for loop, like:
for point in matrix:
print point
the output of that code should look like this:
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
How do I create a 3x4 matrix using lists?