निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
print(max([1, 2, 3, 4], [4, 5, 6], [7]))
A)
B)
C)
D)
Explanation:
The max()
function compares the first element of each list:
- First list:
[1, 2, 3, 4]
(first element: 1) - Second list:
[4, 5, 6]
(first element: 4) - Third list:
[7]
(first element: 7)
Since 7
is the largest, the function returns the list [7]
.
Answer: (B) [7]