I'm trying to learn how to operate on python matrices but it's difficult since online I'm finding nothing but numpy library and it is forbidden to use it on exams, so, do you have any suggestions on where to find a book, a pdf or a site where I can learn more without using numpy??
Asked
Active
Viewed 71 times
0
-
Have you tried using a nested list? – py_coffee Feb 11 '22 at 10:38
-
Yes but i don't know how to move properly so I'm searching examples, even games, like connectfour without using numpy and something like that – Mark Feb 11 '22 at 10:41
1 Answers
0
If I couldn't use numpy I would use bidimensional lists for matrices.
Example:
a = [[1, 2, 3], [4, 5, 6]]
A list that contains list elements that contains numbers.
Numpy is more efficient and if you don't have experience with programming languages like c or c++ some operations could be difficult to implement.
There are a lot of websites to learn with lists, this is a beginner one with clearly and runnable code: https://snakify.org/en/lessons/two_dimensional_lists_arrays/

Rafael Diaz
- 53
- 6
-
1
-
Another one: [GeeksforGeeks](https://www.geeksforgeeks.org/python-using-2d-arrays-lists-the-right-way/) And chek this: [Question](https://stackoverflow.com/questions/6667201/how-to-define-a-two-dimensional-array) – Rafael Diaz Feb 11 '22 at 10:59