0

m = [ [1,2,3], [4,5,6] ] print(m[1][2])

How is possible bro (6)

19th Oct 2020, 3:28 AM
Hacker Tamil Tamila
Hacker Tamil Tamila - avatar
2 odpowiedzi
+ 7
m is a matrix, and m[1,2] is a indexing operation, which will extract the element in the first row and second column of m. As index starts from 0 so 0th row -> [1,2,3] 1st row -> [4,5,6] Now 2nd column of 1st row [4,5,6] 0th column | 1st column | 2nd column 4 | 5 | 6 Hence answer 6.
19th Oct 2020, 3:38 AM
Minho
Minho - avatar
0
Ok
19th Oct 2020, 3:44 AM
Hacker Tamil Tamila
Hacker Tamil Tamila - avatar