John Machin <[EMAIL PROTECTED]> writes:
> s/[1]/[0]/ or more generally:

Oops, got two spellings confused.  Originally was going to use

 from itertools import count, izip
 min(izip(seq, count()))[1]

but did it with enumerate instead.  I don't know which is actually
faster.

> minindex, minvalue = min(enumerate(seq), key=itemgetter(1))

Cool, I like this best of all.  Or alternatively,

  minindex, minvalue = min(izip(seq, count()))
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to