N = list(input())
N.sort(reverse=True)
for i in N:
print(i,end='')
입력받은 문자열을 list로 만든뒤 정렬해주면 된다.
어차피 한자리 수이기 때문에 문자열을 정렬하는거나 숫자 정렬하는거나 같아 그냥 정렬했지만
nums = [int(n) for n in nums] 이렇게 숫자 리스트를 만들수도 있더라 싱기
https://roseline124.github.io/algorithm/2019/04/06/Altorithm-baekjoon-1427.html