Created
November 13, 2011 22:39
Revisions
-
Sam Stewart created this gist
Nov 13, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #Gets the index of maximum element in a list. If a conflict occurs, the index of the last largest is returned def maxl(l): return l.index(reduce(lambda x,y: max(x,y), l)) #Gets the index of minimum element in a list. If a conflict occurs, the index of the last smallest is returned def minl(l): return l.index(reduce(lambda x,y: min(x,y), l)) #same as above but without the reduce coolness def maxl(l): return l.index(max(l)) def minl(l): return l.index(min(l))