min() with custom compare.

Felix Wiemann Felix.Wiemann at gmx.net
Tue Apr 13 18:45:51 EDT 2004


Dan Bishop wrote:

> minimum = reduce(lambda x, y: min(abs(x), abs(y)), l)

This doesn't work for 'l = [5, -4, -1, 9, -9]', as I pointed out in
<87fzbgge4e.fsf at news2.ososo.de>.

-- 
http://www.ososo.de/



More information about the Python-list mailing list