Question DSA-ARR-0034
EasyWhat is the output of this code?
a = [5, 1, 4]
a.sort()
print(a[0] + a[-1])
- A.
10
- B.
6
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Arrays question
What is the output of this code?
a = [5, 1, 4]
a.sort()
print(a[0] + a[-1])
10
6
Sign up free to see the answer and a step-by-step explanation.
5
9