Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

, put together in one list. Written in code, it looks like this:

Code Block
languagepy
matrixmat1 = [[1, 2, 3], [4, 5, 6]]
# To make the matrices easier to read while coding, we can place the different lists vertical to eachother, rather than horizontally.
matrixmat2 = [[1, 2, 3],
		    [4, 5, 6]]


# Printing both of these matrices will result in the same output:
[[1, 2, 3], [4, 5, 6]]




Code Block
languagepy
titleCreating a matrix
a = np.array([[1,2],[3,4]])

...