python函数
找到二维矩阵列中的最大值
1 | max(row[j] for row in matrix) |
1 | matrix = [ |
如果 j = 1(即第二列),等同于 max(2, 5, 8),结果将是 8。
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
1 | max(row[j] for row in matrix) |
1 | matrix = [ |
如果 j = 1(即第二列),等同于 max(2, 5, 8),结果将是 8。