본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#138 백준 파이썬 [10808] 알파벳 개수

https://www.acmicpc.net/problem/10808

 

#Solution

word = list(str(input()))
alphabet = [[alpha, 0] for alpha in 'abcdefghijklmnopqrstuvwxyz']

for alpha in alphabet:
    for character in word:
        if alpha[0] == character:
            alpha[1] += 1

for alpha in alphabet:
    print(alpha[1], end = ' ')