ExamVeda
Login
Home
Python Built In Functions
?

What is the output of the following code:
my_list = [5, 8, 2, 6]
print(max(my_list))

Answer & Solution
Correct Answer: Option A
The correct answer is Option A: 8.
The max() function in Python is used to find the maximum value among the elements of an iterable, such as a list. When you pass the list [5, 8, 2, 6] to the max() function, it returns the maximum value from the list, which is 8.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.