유형 : 구현 

풀이 시간 : 5분

 

def solution(s):
    answer = [x.capitalize() for x in s.split(" ")]
    ans = ''
    for x in answer:
        if answer.index(x) == len(answer)-1:
            ans += x
            break
        ans += x
        ans += " "
    return ans
복사했습니다!