I am using a lambda function to check the highest value, passing 3 arguments
from functools import reduce
# function to check bigger item
f = lambda a,b,c: a if (a > b) else (b if (b > c) else c)
# reduce function
reduce(f, [47, 11, 42, 102, 13])
However I get an error like this
TypeError Traceback (most recent call last)
5 6 # reduce function 7 reduce(f, [47, 11, 42, 102, 13, 21]) TypeError: <lambda>() missing 1 required positional argument: 'c'
reducefunction expects/compares 2 items, not 3