import re
pattern = re.compile('정규표현식')
match = pattern.match("문자열")
컴파일된 패턴 객체의 메소드
import re
def solution(babbling):
cnt = 0
pattern = re.compile('^(aya|ye|woo|ma)+$')
for word in babbling:
if pattern.match(word):
cnt += 1
return cnt
^ 시작
$ 끝
| or
+ 하나 이상 반복