[Programmers] 옹알이 (2)
Python
def solution(babbling):
answer = 0
arr = ["aya", "ye", "woo", "ma"]
for i in babbling:
for j in arr:
if j * 2 not in i:
i = i.replace(j, " ")
if i.isspace():
answer += 1
return answer
댓글남기기