Question PRG-PY-0048
MediumWhat is the output of this program?
print(sorted(["banana", "Apple", "cherry", "date"], key=lambda w: (len(w), w.lower())))
- A.
['date', 'Apple', 'cherry', 'banana']
- B.
['Apple', 'banana', 'cherry', 'date']
- C.
Sign up free to see the answer and a step-by-step explanation.