[프로그래머스-레벨1]문자열 내림차순으로 배치하기 - python

iamjinseo·2022년 8월 22일
0

문제풀이-Python

목록 보기
69/134

https://school.programmers.co.kr/learn/courses/30/lessons/12917

풀이

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

그냥 sorted(s, reverse=True)하면 리스트로 출력돼서 join 사용함.

결과

남의 코드

는 없고 똑같이 씀.

profile
일단 뭐라도 해보는 중

0개의 댓글