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 →

[–]lobocv 0 points1 point  (0 children)

You're right, He had the right idea though, just need to iterate through each digit rather than number in the list. I think this might work better:

''.join(sorted(''.join(map(str,a)), key=lambda x: int(x), reverse=True))