Neal Becker wrote:

> What's a good/fast way to find the index of the minimum element of a
> sequence?  (I'm fairly sure sorting the sequence is not the fastest
> approach)

>>> items = "defbhkamnz"
>>> min(xrange(len(items)), key=items.__getitem__)
6
>>> items[6]
'a'

Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to