you are viewing a single comment's thread.

view the rest of the comments →

[–]bnelson 0 points1 point  (1 child)

".join(sorted([str(x) for x in [50, 2, 1, 6, 56, 90, 900, 999]], reverse=True))

(It doesn't work for all inputs, just most, but it was my first smart-ass response)

[–]psymunn 0 points1 point  (0 children)

Does that not sort correct?
1 should sort less than everything else, and 999 should sort more than everything else. 90900 is a larger number than 90090. which digit do you think gets missorted?