I know how to find the 1st highest value but don\'t know the rest. Keep in mind i need to print the position of the 1st 2nd and 3rd highest value.Thank You and try to keep it si
Use heapq.nlargest:
>>> import heapq >>> [i ... for x, i ... in heapq.nlargest( ... 3, ... ((x, i) for i, x in enumerate((0,5,8,7,2,4,3,9,1))))] [7, 2, 3]