You are viewing a single comment's thread. Return to all comments →
Without using reduce :)
def product(fracs): num=1 deno=1 for x in list(fracs): num*=x.numerator deno*=x.denominator return str(Fraction(num,deno)).split('/')
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 →
Without using reduce :)