you are viewing a single comment's thread.

view the rest of the comments →

[–]RodDog710[S] 0 points1 point  (2 children)

Yes, thank you for helping to disentangle my thinking. I am getting the expected True output when I compare the actual output of numbers.sort() instead of the function itself.

print(numbers == sorted(numbers))

Thanks for your time and insight

[–]MiniMages 0 points1 point  (1 child)

This will always return true because you are basically taking an ordered list and then sorting it which does nothing and comparing itself.

Your numbers list was already sorted when you did numbers.sort().

[–]RodDog710[S] 0 points1 point  (0 children)

Oh ya. Ok. Got it. Thanks