Hello, I’m confused as to why combined comparison is the preferred approach to this sorting problem…
My first attempt code was simply:
fruits = [“orange”, “apple”, “banana”, “pear”, “grapes”]
This worked perfectly and printed my list in the correct order, giving me the same result as the proposed solution. Why is the simple method I used not sufficient? Will it not work in the context of a more complicated program? Please help me understand.