[Programmers] 이상한 문자 만들기
Python
def solution(s):
answer = ''
temps = s.split(' ')
for temp in temps:
for i in range(len(temp)):
if i % 2 == 0:
answer += temp[i].upper()
else:
answer += temp[i].lower()
answer += ' '
return answer[:-1]
댓글남기기