anil maran wrote:
> the max function, it returns the maximum value in the
> list rather than the index associated with that value.
>
> How do I return the index?
l.index(max(l)) will give you the index of the first occurrance of the
maximum.
m = max(l)
[ i for i,v in enumerate(l) if v==m ]
wil
the max function, it returns the maximum value in the
list rather than the index associated with that value.
How do I return the index?
thanks
Anil
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yaho