Search a sequence for its minimum and stop as soon as the lowest possible value is found

Jussi Piitulainen jussi.piitulainen at helsinki.fi
Sun Jan 8 08:14:03 EST 2017


Paul Rubin writes:

> Jussi Piitulainen writes:
>> That would return 0 even when there is no 0 in xs at all.
>
> Doesn't look that way to me:
>
>     >>> minabs([5,3,1,2,4])
>     1

Sorry about that. I honestly meant to say it would return 1 even when
there was a single 0 at the very end. Somehow I got seriously confused.

You noticed the actual problem yourself.



More information about the Python-list mailing list