Paul Rubin <[email protected]> writes: > seems to work, but is ugly. Maybe there's something better.
def minabs2(xs):
def z():
for x in xs:
yield abs(x), x
if x==0: break
return min(z())[1]
is the same thing but a little bit nicer.
--
https://mail.python.org/mailman/listinfo/python-list
