im looking to solve the problem mentioned in the title without any specific functions that may or may not exist for this[
]. Something along the lines of using mostly loops.
I tought about reversing each individual row using list.reverse() and then moving the rows around but im not sure how to implement it.
>Solution :
try this new realization and this will not change the original Matrix
Matrix = [[1,2,3],[4,5,6],[7,8,9]]
newMatrix = []
for line in range(len(Matrix)):
newMatrix.append(sorted(Matrix[line],reverse=True))
newMatrix.reverse()
print(newMatrix)
print(Matrix)
output:
[[9, 8, 7], [6, 5, 4], [3, 2, 1]]
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]