본문 바로가기
파이썬 코딩테스트/프로그래머스

프로그래머스 / JadenCase / 파이썬

by S.T.Lee 2022. 9. 17.
def solution(s):
    answer = ''
    s = s.lower()
    for i in range(len(s)):
        if i == 0:
            answer += s[i].upper()
            continue
        if s[i-1] == " ":
            answer += s[i].upper()
            continue
        answer += s[i]
    return answer