Matrix.py

>>> matrix[1] [4, 5, 6] >>> matrix[1][1] 5 >>> matrix[2][0] 7 >>> matrix = [[1, 2, 3], ... [4, 5, 6], ... [7, 8, 9]] >>> matrix[1][1]
With one index, you get an entire row (really, a nested sublist), and with two, you get an item within the row

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.