문자열내림차순으로배치하기

YU NA Joe·2022년 3월 12일
0
def solution(s):
    s = sorted(s, reverse = True)  # s.sort() 는 only 리스트에서만..
    s = "".join(s)
    return s

# 통과!!

# 다른사람풀이

def solution(s):
    return "".join(sorted(s, reverse=True))

0개의 댓글