Home / MCQ Bank / Computer
Computer Functions In Python

What will be the output of the following Python code? import functools l=[1, 2, 3, 4, 5] m=functools.reduce(lambda x, y:x if x>y else y, l) print(m)

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • 5

Related Computer Questions

How many JDBC driver types does Sun define? Which of the following creates fluctuation plot? try{ File f = new File("a.txt"); }catch(Exception e){ }catch(IOException io){ } Is this code create new file name a.txt ? What will be the output of the following C code? #include <stdio.h> void main() { int k = 0; for (k) printf("Hello"); } What will be the output of the following C++ code? #include <iostream> using namespace std; int g = 100; int main() { int a; { int b; b = 20; a = 35; g = 65; cout << b << a << g; } a = 50; cout << a << g; return 0; }