[백준/Python] 1264번 모음의 개수

divele·2023년 9월 21일

백준

목록 보기
2/17


정답

while True:
    try:
        a = list(map(str, input()))
        if a[0] == '#': break
        else: 
            count_set = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'}
            print(len([i for i in a if i in count_set]))
    except:
        break
profile
https://solved.ac/profile/divele

0개의 댓글