matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] maxRow = sum(matrix[0]) indexOfMaxRow = 0 for i in range(1, len(matrix)): if sum(matrix[i]) > maxRow: maxRow = sum(matrix[i]) indexOfMaxRow = i print("Row", indexOfMaxRow, "has the maximum sum of ", maxRow)

Simple Notes