프로그래머스. 문자열 내림차순으로 배치하기 파이썬 풀이

minan·2021년 6월 22일
0

프로그래머스

목록 보기
24/92

프로그래머스. 연습문제. Level 1. 문자열 내림차순으로 배치하기 파이썬 풀이

문제링크 https://programmers.co.kr/learn/courses/30/lessons/12917

def solution(s): 
    # 문자를 큰것부터 작은 순으로 정렬
    array = sorted(s, reverse=True)
    
    return "".join(array) # 정렬한 문자열 str형식으로 바꿔서 리턴
profile
https://github.com/minhaaan

0개의 댓글

관련 채용 정보

Powered by GraphCDN, the GraphQL CDN