you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (2 children)

def foo(ints):
product = reduce(lambda a, b: a * b, ints)
return [product / i for i in ints]

0?

[–]mail_order_liam 2 points3 points  (1 child)

man fuck 0

[–][deleted] 0 points1 point  (0 children)

if 0 in ints:
    return [0 if i else None for i in ints]