+ 1
Matrix in python
I want to collect all elements of a matrix in a list or in a tuple.what i do?
5 Respostas
+ 2
There are other ways to do this, so I'll keep it very simple for now. This code will work to flatten a 2D list or matrix only.
https://code.sololearn.com/cVahrjLtqevH/?ref=app
+ 1
If you have a X by Y matrix and you are wanting to flatten it so that it is a linear list. You can achieve this by simply looping over each sub list in the matrix and appending them to a new list.
+ 1
Thank you very much
+ 1
Hi! Here is one way to do it:
https://code.sololearn.com/cFg7oNuoSqpg/?ref=app
0
Sorry,i dont understand because i am a elementary programmer.
Can you coding an example?