Skip to content

Commit 6eda1b9

Browse files
committed
“[PGS] JadenCase 문자열 만들기 / Level 2 / 18분 / 성공”
1 parent b6930a7 commit 6eda1b9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
def solution(s):
2+
answer = ''
3+
s = s.lower()
4+
5+
if s[0].isdigit():
6+
answer += s[0]
7+
else:
8+
answer += s[0].upper()
9+
10+
for i in range(1, len(s)):
11+
if s[i-1] == " ":
12+
answer += s[i].upper()
13+
else:
14+
answer += s[i]
15+
16+
return answer

0 commit comments

Comments
 (0)