Code:
t = ((1, 4, 2), (9, 0, 3), (5, 6, 8))
print(t[2][1])
- 9
- 0
- 5
- 6
In a 2D list/tuple, the first index specifies the row number and the second index specifies the column number. Here, the row index is 2, which means the third row since indexing in Python begins from 0, and the column index is 1, which means the second column. Hence, you will get the element in the third row and second column which is 6.