Index of maximum element in list
Scott David Daniels
Scott.Daniels at Acm.Org
Sat Jan 26 00:52:40 EST 2008
Hexamorph wrote:
> ...
> What's about l.index(max(l)) ?
What about
max((x,i) for i,x in enumerate(lst))[1]
More information about the Python-list
mailing list