def __getitem__ ( self , index ) : row , col = index return self . rows [ row ] [ col ]
python get the item from index
Get the item at the given index .
def __getitem__(self, index):
    """Get the item at the given index.

    Index is a tuple of (row, col)
    """
    row, col = index
    return self.rows[row][col]