An idea of how to create an array using functions

0

well I am a newbie and I am learning for python and I want to know if someone can help me with the creation of a matrix, that is, how could the code be if I want a matrix with functions, I have created it in this way easy :

m=[[1,2,3], 
  [4,5,6], 
  [7,8,9]]
a=""

for k in range(3):
    for j in range(3):
       # print(m[k][j])
       a+=str(m[k][j])+'\t'
print(a)
a=""

The fact is that I want a matrix made with functions and that is bigger 5x6 type to say it, I know it's a lot to ask but if there is also some way that I can eliminate a value from either the row or the column (No in advance, thank you very much for your help.

... I forgot to mention it and it is that when printing it the result is literally in the form of a matrix or rather without brackets

    
asked by Alejandro Rodriguez 20.10.2017 в 10:03
source

1 answer

-1

I would recommend you use numpy. It will greatly facilitate operations and representations.

Examples of matrices with numpy in Spanish.

Examples of arrays with numpy in English

Example of numpy with pandas for a cleaner representation.

    
answered by 20.10.2017 в 11:09