Reduce Function
-
Practice>Python>Python Functionals>Reduce Functionhackerrank.com 2019. 3. 22. 12:45
hackerrank.comReduce FunctionProblem link : https://www.hackerrank.com/challenges/reduce-function/problemDifficulty : Medium TipPlease read problem description carefully regarding reduce()lambda function can take multiple argumentlambda x, y: x*y, [[1,2],[3,4],[5,6]](1*2)*(3*4)*(5*6) Solution from fractions import Fraction from functools import reduce def product(fracs): t = reduce(lambda x, y: ..