https://www.acmicpc.net/problem/10808
알파벳 소문자로만 이루어진 단어 S가 주어진다. 각 알파벳이 단어에 몇 개가 포함되어 있는지 구하는 프로그램을 작성하시오.
Code
word = input()
alphabets = [0] * 26
for s in word :
alphabets[(ord(s)-97)%26] += 1
print(' '.join(str(x) for x in alphabets))
참고
ord(문자)
문자 -> 10진수chr(10진수)
10진수 -> 문자