Is there a simple way to find the list index to the max value?

steve steve at lonetwin.net
Tue Feb 16 07:38:09 EST 2010


On 02/16/2010 05:49 PM, W. eWatson wrote:
> See Subject. a = [1,4,9,3]. Find max, 9, then index to it, 2.

The most obvious would be a.index(max(a)). Is that what you wanted ?

cheers,
- steve



More information about the Python-list mailing list