Copyright © tutorialspoint.com
This function returns the elements from the list with maximum value.
max(list) |
Here is the detail of parameters:
list: a list from which max valued element to be returned.
It returns the elements from the list with maximum value.
#!/usr/bin/python list1, list2 = [123, 'xyz', 'zara', 'abc'], [456, 700, 200] print "Max value element : ", max(list1); print "Max value element : ", max(list2); |
This will produce following result:
Max value element : zara Max value element : 700 |
Copyright © tutorialspoint.com