Le Mercredi 21 Juin 2006 16:54, [EMAIL PROTECTED] a écrit : > Hi all, > Is there a simple python function to return the list index of the > minimum entry in a list of lists? > ie, for [[3,3,3,3], [3,3,3,1], [3,3,3,3]] to return 2,4. > Or, same question but just for a list of numbers, not a list of lists. > Thanks, > Josh
In [7]: min([3, 3, 1, 3]) Out[7]: 1 In [8]: min(min(e) for e in [ [3, 3], [3, 3, 1, 3], [3, 3, 3] ]) Out[8]: 1 regards, -- _____________ Maric Michaud _____________ Aristote - www.aristote.info 3 place des tapis 69004 Lyon Tel: +33 426 880 097 -- http://mail.python.org/mailman/listinfo/python-list