https://school.programmers.co.kr/learn/courses/30/lessons/120956
옹알이
처음엔 그냥 이렇게 풀었는데 이렇게 풀면
def solution(babbling):
answer = 0
can_talk_list = ["aya", "ye", "woo", "ma"]
for i in babbling:
for j in can_talk_list:
if j in i:
answer += 1
return answer
def solution(babbling):
answer = 0
can_talk_list = ["aya", "ye", "woo", "ma"]
print(babbling)
for i in babbling:
for j in can_talk_list:
i = i.replace(j,"*")
print(i)
if i.replace("*","") == "":
answer += 1
return answer