21
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following code?
from functools import reduce
print(reduce(lambda a, b: a * b, [1, 2, 3, 4]))What is the output of the following code?
pairs = [(1, 'b'), (2, 'a')]
print(sorted(pairs, key=lambda p: p[1]))