Python_Institute
PCEP-30-02 · Question #27
What is the expected output of the following code? ``python 1 data = ['abc', 'def', 'abcde', 'efg'] 2 print(max(data)) ``
The correct answer is A. efg. See the full explanation below for the reasoning.
Question
What is the expected output of the following code?
1 data = ['abc', 'def', 'abcde', 'efg']
2 print(max(data))
Options
- Aefg
- Babc
- Cdef
- DThe code is erroneous.
- Eabcde
- FNone of the above.
How the community answered
(37 responses)- A78% (29)
- B5% (2)
- C3% (1)
- D11% (4)
- F3% (1)
Community Discussion
No community discussion yet for this question.