본문 바로가기

파이썬

[파이썬] 띄어쓰기가 되어있는 문자의 맨 앞 글자를 대문자로 - title()

def Jaden_Case(s):

    return s.title()

 

print(Jaden_Case("3people unFollowed me"))

print(Jaden_Case("for the last week"))

 

출력 ↓

3People Unfollowed Me

For The Last Week