I have the the following list:
mylist = [[1,2,3], [4,5,6], [7,8,9]]. I want to basically update its last row and 1st column value which in coding terms would be this:
Basically, what I want to update this is with the maximum value between the value present at this specific row and column and the value at its last row and 0th column value which is:
mylist[-1]. Something like the following:
mylist[-1] = max(mylist[-1], mylist[-1])
The values inside the
max function can change. This is just one small example. My main goal is to try and find a way of updating the value inside this 2D list.
Any help will be appreciated. Thanks!