HeYStRanGeR
article thumbnail

(23.05.15)

이것도 왜인지 모르게 깃허브 자동 업로드에 오류가 났다!!!

https://school.programmers.co.kr/learn/courses/30/lessons/12930#

 


 

고려해야할 테스트 케이스가 많은 문제였다.

 

 

 

<python />
def solution(s): answer = '' index = 0 for i in range(len(s)): if i==0 and s[i]==' ': answer += ' ' elif i>0 and s[i]==' ': answer += ' ' index = 0 elif index%2 == 0: answer += s[i].upper() index += 1 elif index%2 != 0: answer += s[i].lower() index += 1 return answer
728x90
profile

HeYStRanGeR

@HeYStRanGeR

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!