Re: min, max with position

2022-06-05 Thread Michael F. Stemper
On 04/06/2022 14.08, Stefan Ram wrote: "Michael F. Stemper" writes: Are there similar functions that return not only the minimum or maximum value, but also its position? The maximum value does not need to have a unique position. Which is something that I'll just have to live with, whethe

Re: min, max with position

2022-06-05 Thread Antoon Pardon
Op 5/06/2022 om 01:52 schreef Greg Ewing: On 5/06/22 10:07 am, dn wrote: On 05/06/2022 09.50, Chris Angelico wrote: min(enumerate(l), key=lambda x: x[1]) (0, 1.618033) But, but, but which of the above characters is an 'el' and which a 'one'??? (please have pity on us old f...s and the v