Python: Get the last item of an multi-dimensional Array in a dictionary

Referring to “data” which is a dictionary.

data = [('A',
row     X   Y
1       5  10
2       6  11
3       7  13
),
('B',
row     X   Y
1       9   7
2       12  8
3       14  12)]

To get the last row and column Y of item B

data['B'].Y[-1]

Leave a Comment

Your email address will not be published. Required fields are marked *