1# any list
2a = [1, 7, 3, 12, 5]
3
4# index of minimum element
5# if more than 1 minimum,
6# first index is returned
7min_index = a.index(min(a))
8
9# index of maximum element
10max_index = a.index(max(a))
1Numbers = [90,78,34,50,100,99]
2higest_number = 0
3for number in Numbers:
4 if number > higest_number:
5 higest_number = number
1def Max_min(list_of_number):
2 largest_number = 0
3 smallest_number = 0
4 for num in list_of_number:
5 if num > largest_number:
6 largest_number = num
7 elif num < smallest_number:
8 smallest_number = num
9 return "Largest number ="+ str(largest_number) + "Smallest Number="+str(smallest_number)
1#!/usr/bin/python
2
3list1, list2 = [123, 'xyz', 'zara', 'abc'], [456, 700, 200]
4print "Max value element : ", max(list1)
5print "Max value element : ", max(list2)