>>> numbers = [0, 0, 1, 0, 0, 1], [0, 1, 0, 2, 0, 0], [0, 0, 2, 0, 0, 1], [0, 1, 0, 3, 0, 0], [0, 0, 0, 0, 4, 0]
>>> map(max, numbers)
<map object at 0x0000018E8FA237F0>
>>> list(map(max, numbers)) # max numbers from each sublist
[1, 2, 2, 3, 4]
>>> max(map(max, numbers)) # max of those max-numbers
4
public class MyClass {
public static void main(String args[]) {
int arr[][] = {
{1,2,3,4,5},
{100,101,102,103,10491},
{2,80,70,57,66},
{1000,10001,65,34,54}
};
int max = Integer.MIN_VALUE;
for(int i = 0; i < arr.length; i++){
for(int j = 0; j < arr[i].length; j++){
if(arr[i][j] > max){
max = arr[i][j];
}
}
}
System.out.println("Maximum Value : " + max);
}
}
a = [1, 2, 3, 4, 5]
print(max(a))
# 5