0

What does the dubled squarebrackets at line 10 do? How do they work?

https://code.sololearn.com/cMVr292O6zOy/?ref=app

30th Mar 2018, 7:08 PM
Sindre Havn
Sindre Havn - avatar
3 ответов
+ 3
It's a multidimensional array. In this case it's a 2D array. Each [] is referencing the index. In a 2D array, you can think of it as rows/columns or a coordinate system. myArray[row][col]
30th Mar 2018, 7:13 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 1
To access the element inside the list which is inside another list, first set of square brackets select the list the second set select the element
30th Mar 2018, 7:12 PM
TurtleShell
TurtleShell - avatar
+ 1
Thx you two TurtleShell and Jakob Marley . Very helpfull!
30th Mar 2018, 7:15 PM
Sindre Havn
Sindre Havn - avatar