"Michael F. Stemper" <michael.stem...@gmail.com> writes: Are there similar functions that return not only the minimum or maximum value, but also its position?
>>> specialmin(l) (0,1.618033) >>> specialmax(l) 3.141593 >>> I believe that what you are looking for is usually called "argmax" and "argmin" (see <en.wikipedia.org/wiki/Arg_max>). These don't exist in the standard Python library as far as I can tell, but numpy does have "argmax" and "argmin" routines. -- Alan Bawden -- https://mail.python.org/mailman/listinfo/python-list