You are viewing a single comment's thread. Return to all comments →
def product(fracs): if len(fracs) == 1: return fracs[0].numerator, fracs[0].denominator else: t = reduce( lambda x, y : x * y, fracs ) return t.numerator, t.denominator
Seems like cookies are disabled on this browser, please enable them to open this website
Reduce Function
You are viewing a single comment's thread. Return to all comments →