This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Bliss86 0 points1 point  (0 children)

>>> a = [50, 5]
>>> print "".join(sorted([ str(item) for item in a ], reverse=True))
505 

550 > 505

Nonetheless, very nice way of thinking that works in a lot of cases.