Problem:


Counting Characters

  Write a program which counts and reports the number of each alphabetical letter. Ignore the case of characters.

Input

  A sentence in English is given in several lines.

Output

  Prints the number of alphabetical letters in the following format:

a : The number of 'a'
b : The number of 'b'
c : The number of 'c'
  .
  .
z : The number of 'z'

Constraints

The number of characters in the sentence < 1200

Sample Input

This is a pen.

Sample Output

a : 1
b : 0
c : 0
d : 0
e : 1
f : 0
g : 0
h : 1
i : 2
j : 0
k : 0
l : 0
m : 0
n : 1
o : 0
p : 1
q : 0
r : 0
s : 2
t : 1
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0



Sample input:
This is a pen.


Sample output:
a : 1
b : 0
c : 0
d : 0
e : 1
f : 0
g : 0
h : 1
i : 2
j : 0
k : 0
l : 0
m : 0
n : 1
o : 0
p : 1
q : 0
r : 0
s : 2
t : 1
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0

Submission status: Accepted

Solution code:
import sys

list = "abcdefghijklmnopqrstuvwxyz"
y = sys.stdin.read()
for x in list:
    print(x + ' : ' + str(y.lower().count(x)))

Submission status: Accepted

Solution code:

c = [0]*26

while True:
    try:
        a = input()
        a = list(a.lower())
    except:
        break
    
    for i in range(len(a)):
        tmp = ord(a[i])
        if tmp>=97 and tmp <= 123:
            c[tmp-97] += 1

for i in range(ord("a"),ord("z")+1):
    print(chr(i),":",c[i-97])

Submission status: Accepted

Solution code:
sentence = ''
while True:
    try:
        sentence += input()
    except:
        break
sl = list(sentence.lower())
for i in range(97, 123):
    print(chr(i), ':', sl.count(chr(i)))

Submission status: Accepted

Solution code:
letters = 'abcdefghijklmnopqrstuvwxyz'
counts = [0] * 26
sentence = []

s = input()
while s:
    try:
        sentence += s
        s = input()
    except EOFError:
        break

for c in sentence:
    i = letters.find(c.lower())
    if i >= 0:
        counts[i] += 1
        
for c in letters:
    print(c, ':', counts[letters.find(c)])

Submission status: Accepted

Solution code:
import sys

alphabet = "abcdefghijklmnopqrstuvwxyz"
count_dict = dict.fromkeys(alphabet,0)
s = []
for l in sys.stdin:
    s.append(l)

def count(str):
    for c in alphabet:
        count_dict[c] += str.count(c)
    str = str.swapcase()
    for c in alphabet:
        count_dict[c] += str.count(c)

for str in s:
    count(str)
    
for key,value in count_dict.items():
    print("{} : {}".format(key,value))

Submission status: Accepted

Solution code:
import sys
import string

def count_char_v2():
    alphabet = string.ascii_lowercase
    lst = [0 for _ in range(len(alphabet))]

    for line in sys.stdin:
        for char in line:
            if char.isalpha():
                index = alphabet.index(char.lower())
                lst[index] += 1

    for i in range(len(alphabet)):
        print(f"{alphabet[i]} : {lst[i]}")


if __name__ == "__main__":
    count_char_v2()

Submission status: Accepted

Solution code:
letter = "abcdefghijklmnopqrstuvwxyz"
dic = {}
for i in letter:
    dic.setdefault(i,0)
while 1:
    try:
        a = str(input()).lower()
    except:
        break
    for i in a:
        for j in letter:
            if i == j:
                dic[i] += 1
for i in dic:
    print(f"{i} : {dic[i]}")

Submission status: Accepted

Solution code:
import sys
cnts = {}
for line in sys.stdin:
    for c in list(line.lower()):
        cnts[c] = cnts.get(c,0) + 1
  
for c in range(ord('a'),ord('z')+1):
    print(chr(c),':',cnts.get(chr(c),0))

Submission status: Accepted

Solution code:
alphabets = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except:
        break

for a in alphabets:
    print('{} : {}'.format(a, text.count(a)))

Submission status: Accepted

Solution code:
s=""
while True:
    try:
        s+=str(input().lower())
    except:
        break
for i in range(97,123):
    print(chr(i),":",s.count(chr(i)),sep=" ")

Submission status: Accepted

Solution code:
import string
import sys

F = sys.stdin

mydict = {}
alp = list(string.ascii_lowercase)

for i in alp:
        mydict[i] = 0

for line in F:
    line = line.rstrip()
    line = line.lower()
        
    
    for j in line:
        if j in alp:
            mydict[j] += 1
        
for key, value in mydict.items():
    print("{0} : {1}".format(key, value))

Submission status: Accepted

Solution code:
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),":",s.count(chr(i)))

Submission status: Accepted

Solution code:
al = [chr(ord("a") + i) for i in range(26)]


def num_al(x):
    a = word.count(chr(ord("a") + x))
    return a


mylist = []
while True:
    try:
        x = input()
        mylist.append(x)
    except EOFError:
        break

abc = "".join(mylist)
word = abc.lower()

for i in range(26):
    print(f"{al[i]} : {num_al(i)}")

Submission status: Accepted

Solution code:
import sys

x = {}

for line in sys.stdin:
  for l in line:
    if l.isalpha():
      c = l.lower()
      x[c] = x.get(c,0)+1

for i in range(26):
  c = chr(ord('a')+i)
  print(f'{c} : {x.get(c,0)}')

Submission status: Accepted

Solution code:
import sys

ans = sys.stdin.read().lower()

for key in range(97,123):
    key_c = chr(key)
    key_cnt = ans.count(key_c)
    print(key_c,':',key_cnt)

Submission status: Accepted

Solution code:
charactors = {}
for i in range(97,123):
    key = chr(i)
    value = 0 
    charactors[key] = value

while True:
    try:
        string = input()

        for c in string:
            low_c = c.lower()
            if low_c.isalpha():
                charactors[low_c] += 1
    except EOFError:
        break

for k,v in charactors.items():
    print(k +" : "+str(v))

Submission status: Accepted

Solution code:
from string import ascii_lowercase, ascii_uppercase
text = open(0).read()
text = list(text.lower())
abc = list(ascii_lowercase)
answer = [0]*26

for i in text:
    num = ascii_lowercase.find(i)
    if num > -1:
        answer[num] += 1

for i in range(26):
    print(f"{abc[i]} : {answer[i]}")

Submission status: Accepted

Solution code:
import sys

l = [s.lower() for s_l in list(sys.stdin) for s in s_l if 65 <= ord(s) < 91 or 97 <= ord(s) < 123]
d = {chr(k): 0 for k in range(97, 123)}
for s in l:
    if d.get(s, None) is not None:
        d[s] += 1
for k in d:
    print('{} : {}'.format(k, str(d[k])))

Submission status: Accepted

Solution code:
s = ""
try:
    while True:
        s += input().lower()
except:
    pass
for i in range(ord("a"),ord("z")+1):
    print(chr(i)+" : "+str(s.count(chr(i))))

Submission status: Accepted

Solution code:
import sys
texts=sys.stdin.read()

alpha = ['A','B','C','D','E','F','G','H','I',
         'J','K','L','M','N','O','P','Q',
         'R','S','T','U','V','W','X','Y','Z']

for i in range(len(alpha)):
    ans = texts.count(alpha[i])
    ans += texts.count(alpha[i].lower())
    print(alpha[i].lower() + ' ' + ':' + ' ' + str(ans))
    ans = 0

Submission status: Accepted

Solution code:
import sys

alphas = {alpha: 0 for alpha in "abcdefghijklmnopqrstuvwxyz"}

for char in sys.stdin.read().lower():
    if char not in alphas.keys():
        continue
    alphas[char] += 1
    
for alpha, val in alphas.items():
    print("{} : {}".format(alpha, val))

Submission status: Accepted

Solution code:
import sys
s=sys.stdin.read().lower()
for c in map(chr,range(97,123)):print(c,':',s.count(c))

Submission status: Accepted

Solution code:
count_char = list(0 for i in range(26))
while True :
    try :
        str_org = str(input())
        str_org = str_org.lower()
        for i in range(len(str_org)) :
            num_org = ord(str_org[i])
            if num_org > 96 and num_org < 123 :
                count_char[num_org - 97] += 1
    except EOFError :
        break
    
for i in range(97, 123) :
    print(chr(i), ":", count_char[i-97])

Submission status: Accepted

Solution code:
sentence = ''

while True:
    try:
        temp = input()
    except:
        break
    sentence += temp

alpha = [chr(i) for i in range(97, 97+26)]

for each_char in alpha:
    print('{} : {}'.format(each_char,sentence.lower().count(each_char)))

Submission status: Accepted

Solution code:
import sys
d = {chr(i): 0 for i in range(97,97+26)}
for line in sys.stdin:
  s = list(line.lower())
  for i in s:
    if d.get(i) != None:
      d[i] += 1
[print(f"{key} : {value}") for [key,value] in d.items()]

Submission status: Accepted

Solution code:
import sys

table = [0]*26

letters = "abcdefghijklmnopqrstuvwxyz"
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1

for i in range(len(letters)):
    print("%s : %d"%(letters[i],table[i]))

Submission status: Accepted

Solution code:
import sys, string

lines = ''
for line in sys.stdin:
    lines += line
arr = [i for i in string.ascii_lowercase]
lines = lines.lower()

for i in range(len(arr)):
    print(arr[i], ':', lines.count(arr[i]))

Submission status: Accepted

Solution code:
from sys import stdin

sentence = stdin.read().rstrip()
lis = [0] * 26
for char in sentence:
    if char.isalpha():
        codenum = ord(char)
        if codenum >= 97:
            codenum -= 97
        else:
            codenum -= 65
        lis[codenum] += 1

for i in range(len(lis)):
    print('%s : %d'%(chr(i+97), lis[i]))

Submission status: Accepted

Solution code:
import sys

string = sys.stdin.read().lower()
[print(f'{c} : {string.count(c)}') for c in map(chr, range(97, 97+26))]

Submission status: Accepted

Solution code:
y = [0 for i in range(26)]
while True:
      try:
            s = input()
      except:
            break
      for i in range(len(s)):
            m = ord(s[i])-ord('A')
            if(m >= 0 and m < 26):
                  y[m]+=1
            m = ord(s[i])-ord('a')
            if(m >= 0 and m < 26):
                  y[m]+=1
for i in range(26):
      print(chr(i+ord('a')),":",y[i])

Submission status: Accepted

Solution code:
import string
import sys

input_str = sys.stdin.read()

for i in range(26):
    char = string.ascii_lowercase[i]
    CHAR = string.ascii_uppercase[i]
    cnt = input_str.count(char) + input_str.count(CHAR)
    print("{0} : {1}".format(char, cnt))

Submission status: Accepted

Solution code:
#標準入力
str3 = input()
str3 = str3.lower()
try:
    while True:
        str1 = input()
        str1 = str1.lower()
        str3 += str1
except EOFError:
    pass

#英語を数字に変換して繰り返し処理をし、文字数をカウントして出力する
finally:
    for num in range(ord("a"),ord("a") + 26):
        str2 = chr(num)
        num2 = str3.count(str2)
        print(str2 + " : " + str(num2))

Submission status: Accepted

Solution code:
abc = 'abcdefghijklmnopqrstuvwxyz'
arrabc = []
for s in abc:
	arrabc.append(s)

line = ''
while True:
	try:
		sinput = input()
		if sinput == '':
			break
		line = line + sinput
	except EOFError:
		break

arrinput = []
for s in line:
	arrinput.append(s.lower())

for s in arrabc:
	print('{0} : {1}'.format(s,arrinput.count(s)))

Submission status: Accepted

Solution code:
import sys

text = sys.stdin.read()

counts = {chr(code): 0 for code in range(ord('a'), ord('z')+1)}

for letter in text:
    letter = letter.lower()
    if letter in counts.keys():
        counts[letter] += 1

for key, val in counts.items():
    print(key + ' : ' + str(val),end='\n')

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.read()
s = s.lower()
ans = [0] * 26
n = [chr(i) for i in range(97, 123)]
for i in range(len(s)):
    if s[i] in n:
        ans[n.index(s[i])] += 1

for i in range(len(ans)):
    print(n[i], ":", ans[i])

Submission status: Accepted

Solution code:
import sys
import string
texts = sys.stdin.read()
texts = texts.lower()

for char in list(string.ascii_lowercase):
    print("{} : {}".format(char, texts.count(char)))

Submission status: Accepted

Solution code:
alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except EOFError:
        break

for r in alpha:
    print("{} : {}".format(r, text.count(r)))

Submission status: Accepted

Solution code:
s = ""
try:
	while True:
		t = input()
		if t == "":
			break
		s += t
except EOFError:
	pass

s = str.lower("".join(s))

al_list = [chr(i) for i in range(97,97+26)]
ans = []

for i in range(len(s)):
    ans.append(s[i:i+1])

for i in range(26):
    if al_list[i] in ans:
        x = ans.count(al_list[i])
        print(al_list[i], ":", x)
    else:
        print(al_list[i], ":", 0)

Submission status: Accepted

Solution code:
alphabet = {
  'a': 0,
  'b': 0,
  'c': 0,
  'd': 0,
  'e': 0,
  'f': 0,
  'g': 0,
  'h': 0,
  'i': 0,
  'j': 0,
  'k': 0,
  'l': 0,
  'm': 0,
  'n': 0,
  'o': 0,
  'p': 0,
  'q': 0,
  'r': 0,
  's': 0,
  't': 0,
  'u': 0,
  'v': 0,
  'w': 0,
  'x': 0,
  'y': 0,
  'z': 0,
}

import sys

def main():
  sentence = ''

  for line in sys.stdin:
    for l in line:
      if l.lower() in alphabet:
        alphabet[l.lower()] += 1

  for key, value in alphabet.items():
    print('{} : {}'.format(key, value))

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import sys
s=sys.stdin.read().lower()
for c in map(chr,range(ord('a'),ord('z')+1)):
    print(c,':',s.count(c))

Submission status: Accepted

Solution code:
import sys
cnt = [0]*26

for line in sys.stdin:
    for c in line:
        c_ord = ord(c)
        if 65<=c_ord<=90:
            cnt[c_ord-65] += 1
        elif 97<=c_ord<=122:
            cnt[c_ord-97] += 1
            
for i in range(26):
    print(chr(i+97),":",cnt[i])

Submission status: Accepted

Solution code:
S = ''
while True:
  try:
    S += input().lower()
  except:
    break
ref_list = 'abcdefghijklmnopqrstuvwxyz'

for i in range(len(ref_list)):
    print('{0:s} : {1:d}'.format(ref_list[i], S.count(ref_list[i])))

Submission status: Accepted

Solution code:
alphabet = map(chr, range(97, 123))
s = []

while True:
    try:
        s += input().lower()
    except EOFError:
        break

for i in alphabet:
    print(i + ' : ' + str(s.count(i)))

Submission status: Accepted

Solution code:
import sys


table = [0]*26

letters = "abcdefghijklmnopqrstuvwxyz"
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1

for i in range(len(letters)):
    print("%s : %d"%(letters[i],table[i]))

Submission status: Accepted

Solution code:
import sys

table = [0] * 26
letters = "abcdefghijklmnopqrstuvwxyz"

text = sys.stdin.read().lower()

for a in range(0, len(text)):
    for b in range(0, 26):
        if letters[b] == text[a] or letters[b].upper() == text[a]:
            table[b] += 1

for i in range(0, len(letters)):
    print(str(letters[i]) + " : " + str(table[i]))

Submission status: Accepted

Solution code:
alpha_dict = {}
for i,c in enumerate(range(ord('a'),ord('z')+1)):
    alpha_dict[chr(c)] = 0

input_str = []

while True:
    try:
        input_value = input().lower()
        input_str.append(input_value)
    except:
        break
    

for input_row in input_str:
    for i in input_row:
        if i in alpha_dict.keys():
            alpha_dict[i] += 1

for key,value in alpha_dict.items():
    print("%s : %d" %(key,value))

Submission status: Accepted

Solution code:
import string
from collections import Counter

alphabet_list = string.ascii_lowercase

sentences = []
while True:
    try:
        sentence = input().lower()
        sentences.append(sentence)
    except EOFError:
        break

sentence_flatten = ''.join(sentences)

count_list = Counter(sentence_flatten)

for alphabet in alphabet_list:
    print(f'{alphabet} : {count_list[alphabet]}')

Submission status: Accepted

Solution code:
import sys
alphabet = "abcdefghijklmnopqrstuvwxyz"
s = "".join(sys.stdin.readlines()).lower()

for t in list(alphabet):
    print("{} : {}".format(t, s.count(t)))

Submission status: Accepted

Solution code:
import sys

table = [0]*26

letters = 'abcdefghijklmnopqrstuvwxyz'
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1

for i in range(len(letters)):
    print('{} : {}'.format(letters[i], table[i]))

Submission status: Accepted

Solution code:
A = []
while True:
    try:
        S = input()
        for s in S:
            if 'a' <= s <= 'z' or 'A' <= s <= 'Z':
                A.append(s.lower())
    except EOFError:
        break

D = {}
for s in A:
    if s in D:
        D[s] += 1
    else:
        D[s] = 1

Str = [chr(i) for i in range(97, 97+26)]
for s in Str:
    print(s, end=" ")
    print(":", end=" ")
    if s in D:
        print(D[s])
    else:
        print(0)

Submission status: Accepted

Solution code:
A = [chr(ord('a') + i) for i in range(26)]
x = open(0).read()
# for s in list:
#     mojiretu += s

for i in range(len(A)):
    print(A[i] + " : ", end = "" )
    print(x.lower().count(A[i]))

Submission status: Accepted

Solution code:
l=[0 for i in range(26)]
a="abcdefghijklmnopqrstuvwxyz"
while True:
    try:
        tex = input()
    except :
        break
    tex=tex.lower()
    for i in tex:
        count=0
        for j in a:
            if i==j:
                l[count]+=1
            count+=1
    count=0
for k in a:
    print(k+" : "+str(l[count]))
    count+=1

Submission status: Accepted

Solution code:

char_dict = {'a':0,'b':0,'c':0,'d':0,'e':0,
             'f':0,'g':0,'h':0,'i':0,'j':0,
             'k':0,'l':0,'m':0,'n':0,'o':0,
             'p':0,'q':0,'r':0,'s':0,'t':0,
             'u':0,'v':0,'w':0,'x':0,'y':0,
             'z':0,}
char_array = ['a','b','c','d','e',
              'f','g','h','i','j',
              'k','l','m','n','o',
              'p','q','r','s','t','u','v','w','x','y','z']
while 1:
    try:
        string = input().lower()
    except:
        break
    l = list(string)

    for i in range(len(l)):
        if l[i] in char_dict:
            char_dict[l[i]] += 1
            
for i in range(26):
    print(f'{char_array[i]} : {char_dict[char_array[i]]}')

Submission status: Accepted

Solution code:
import sys
text = sys.stdin.read()
text=text.lower()
alf = list('abcdefghijklmnopqrstuvwxyz')
cnt=[0]*26
for i in text:
    c=0
    for j in alf:
        if i == j:
            cnt[c]+=1
        c+=1
for i in range(26):
    print(alf[i]+' : '+str(cnt[i]))

Submission status: Accepted

Solution code:
strings=[]

while(1):
    try:
        s=input()
    except:
        break
    
    strings.append(s)

pattern=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
ans=[0 for i in range(26)]

for string in strings:
    s=list(string.lower())
    for letter in s:
        try:
            #print(ord(letter))
            ans[ord(letter)-97]+=1
        except Exception:
            pass

for i in range(26):
    print(pattern[i]+" : "+str(ans[i]))

Submission status: Accepted

Solution code:
import string
import sys

str = ''
for s in sys.stdin:
    str += s

dict = {e: 0 for e in string.ascii_lowercase}

for e in str:
    if e.lower() in string.ascii_lowercase:
        dict[e.lower()] += 1

for k, v in dict.items():
    print('{} : {}'.format(k, v))

Submission status: Accepted

Solution code:
import sys

letters = "abcdefghijklmnopqrstuvwxyz"
sentence = sys.stdin.read()

table = [0] * 26

for i in sentence:
	count = 0
	for j in letters:
		if i == j or i == j.upper():
			table[count] += 1
		count += 1


for x in range(26):
	print("%s : %d" % (letters[x], table[x]))

Submission status: Accepted

Solution code:
import sys
sentence = sys.stdin.readlines()
a=""
for s in sentence:
  a += s.strip("\n")

a = a.lower()

data = dict()  
alpha = "abcdefghijklmnopqrstuvwxyz"
for key in alpha:
  data[key] = 0

for key in a:
  if key in alpha:
    data[key] += 1

for key in alpha:
  print("{} : {}".format(key,data[key]))

Submission status: Accepted

Solution code:
alphabet = [chr(i) for i in range(97,123)]
f = open(0)
alphabet_list = [0]*26

for line in f.readlines():
    for ch in alphabet:
        ch_count = line.lower().count(ch)
        alphabet_list[alphabet.index(ch)] += ch_count

for i in range(26):
    print("{} : {}".format(alphabet[i],alphabet_list[i]))

Submission status: Accepted

Solution code:
import sys

result_alphabet = [0] * 26

input_str = sys.stdin.read().lower()

for x in range(len(input_str)):
    alpha_str = input_str[x:x+1]
    alpha_num = ord(alpha_str) - 97
    if alpha_num > -1 and alpha_num < 27:
        result_alphabet[alpha_num] += 1

for i in range(26):
    alphabet = chr(i+97)
    print(f'{alphabet} : {result_alphabet[i]}')

Submission status: Accepted

Solution code:
list_alpha = [x for x in 'abcdefghijklmnopqrstuvwxyz']
c_list = ''
    
while True:
    try:
        c_list += input().lower()
    except EOFError:
        break

for l in list_alpha:
    print('{} : {}'.format(l,c_list.lower().count(l)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
lines = sys.stdin.read()
line= str.lower(lines)
line2=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

for i in line2:
    print(str(i)+" : "+str(line.count(i)))

Submission status: Accepted

Solution code:
import sys

S = sys.stdin.read().lower()
ABC = [chr(ord('a') + i) for i in range(26)]

for abc in ABC:
    print(abc, ':', S.count(abc))

Submission status: Accepted

Solution code:
chr_dict = {chr(ord('a') + i) : 0 for i in range(26)}

import sys
input_lines = sys.stdin.readlines()
for line in input_lines:
    for s in line:
        if s.lower() in chr_dict:
            chr_dict[s.lower()] += 1

print(*[f"{key} : {value}" for key,value in chr_dict.items()],sep="\n")

Submission status: Accepted

Solution code:
import sys
str_in = ""
for e in sys.stdin:
    str_in += e
str_in_lower = str_in.lower()
print("a : " + str(str_in_lower.count("a")))
print("b : " + str(str_in_lower.count("b")))
print("c : " + str(str_in_lower.count("c")))
print("d : " + str(str_in_lower.count("d")))
print("e : " + str(str_in_lower.count("e")))
print("f : " + str(str_in_lower.count("f")))
print("g : " + str(str_in_lower.count("g")))
print("h : " + str(str_in_lower.count("h")))
print("i : " + str(str_in_lower.count("i")))
print("j : " + str(str_in_lower.count("j")))
print("k : " + str(str_in_lower.count("k")))
print("l : " + str(str_in_lower.count("l")))
print("m : " + str(str_in_lower.count("m")))
print("n : " + str(str_in_lower.count("n")))
print("o : " + str(str_in_lower.count("o")))
print("p : " + str(str_in_lower.count("p")))
print("q : " + str(str_in_lower.count("q")))
print("r : " + str(str_in_lower.count("r")))
print("s : " + str(str_in_lower.count("s")))
print("t : " + str(str_in_lower.count("t")))
print("u : " + str(str_in_lower.count("u")))
print("v : " + str(str_in_lower.count("v")))
print("w : " + str(str_in_lower.count("w")))
print("x : " + str(str_in_lower.count("x")))
print("y : " + str(str_in_lower.count("y")))
print("z : " + str(str_in_lower.count("z")))

Submission status: Accepted

Solution code:
import sys
count = [0 for i in range(26)]

s = sys.stdin.read().lower()
# Ctrl + Dで入力終了

# 入力値sをイテレータに該当するcountにカウントアップしていく
# ord('文字列')でunicodeポイントを返す(a, b, c, … → 97, 98, 99, … )
for i in s:
    if 0 <= ord(i)-97 <= 25:
        count[ord(i)-97] += 1

# countを出力
for index, num in enumerate(count):
    print(f"{chr(index+97)} : {num}")

Submission status: Accepted

Solution code:
str = ""
while True:
  try:
    line = input()
  except EOFError:
    break
  str += line.lower()
for c in range(ord('a'), ord('z') + 1):
  print(chr(c), ":", str.count(chr(c)))

Submission status: Accepted

Solution code:
import string
import sys

table = sys.stdin.read()
for ch, CH in zip(string.ascii_lowercase, string.ascii_uppercase):
    c = table.count(ch)
    C = table.count(CH)
    print(ch+" : "+str(c+C))

Submission status: Accepted

Solution code:
import sys
import string
import functools


def count_alphabet(counter, letter):
    if letter.lower() in counter:
        counter[letter.lower()] += 1

    return counter


if __name__ == "__main__":
    sentence = sys.stdin.read()

    alphabet_counter = {}

    for c in string.ascii_lowercase:
        alphabet_counter[c] = 0

    alphabet_counter = functools.reduce(
        count_alphabet,
        sentence,
        alphabet_counter
    )

    for letter, num_contains in alphabet_counter.items():
        print('{c} : {n}'.format(c=letter, n=num_contains))

Submission status: Accepted

Solution code:
import sys
string=sys.stdin.read().lower()
cnt=[0]*26
alphabet = "abcdefghijklmnopqrstuvwxyz"

for i in range(len(string)):
  for j in range(len(alphabet)):
    if string[i]==alphabet[j]:
      cnt[j]+=1
      
for i in range(len(alphabet)):
  print(str(alphabet[i])+" : "+str(cnt[i]))

Submission status: Accepted

Solution code:
s = open(0).read()
sum = [0 for _ in range(26)]
for i in range(len(s)):
    for j in range(97,97+26):
        if s[i] == chr(j):
            sum[j-97] += 1
    for j in range(65,65+26):
        if s[i] == chr(j):
            sum[j-65] += 1
for i in range(26):
    print(f'{chr(i+97)} : {sum[i]}')

Submission status: Accepted

Solution code:
import sys
s = []
for line in sys.stdin:
    s.append (list(line.rstrip()))

alphabet = [chr(i) for i in range(ord('a'), ord('z')+1)]
for x in alphabet:
    t = 0
    for l in s:
        t += l.count(x)+l.count(str.upper(x))
    print (x,":",t)

Submission status: Accepted

Solution code:
import sys

nums = list()

o = 'abcdefghijklmnopqrstuvwxyz'

for i in range(26):
    nums.append(0)

mylist1 = sys.stdin.read()


# while True:
#     try:
#         val = input()
#         for i in val:
#             mylist1.append(i) 
#     except:
#         break

for i in mylist1:
    for q in range(len(o)):
        if i.lower() == o[q]:
            nums[q] = nums[q] + 1

for q in range(len(o)):
    print('{} : {}'.format(o[q], nums[q]))

Submission status: Accepted

Solution code:
from collections import Counter
import string

counter = Counter()
while True:
    try:
        s = input().lower()
        counter += Counter(s)
    except EOFError:
        break

for c in string.ascii_lowercase:
    count = counter[c]
    print(f'{c} : {count}')

Submission status: Accepted

Solution code:
import sys

S = sys.stdin.read()
alphabet = [chr(i) for i in range(0x61,0x7b)]
cnt = [0] * len(alphabet)

for s in S:
    s = s.lower()
    if s in alphabet:
        cnt[ord(s)-0x61] += 1

for alpha,num in zip(alphabet,cnt):
    print('{} : {}'.format(alpha,num))

Submission status: Accepted

Solution code:
judge="abcdefghijklmnopqrstuvwxyz"
results=[0]*26
while True:
    try:
        str=input()
    except:
        break
    for i in range(len(str)):
        for j in range(0,26):
            if str[i]==judge[j] or str[i]==judge[j].upper():
                results[j]+=1
for i in range(0,26):
    print(judge[i],":",results[i])

Submission status: Accepted

Solution code:
dict = {}
for alpha in [ chr(code) for code in range(ord('a'), ord('z') + 1) ]:
    dict[alpha] = 0

s = ''
while True:
    try:
        s += input()
    except EOFError:
        break

for c in s:
    if c.isalpha():
        dict[c.lower()] += 1

for alpha in [ chr(code) for code in range(ord('a'), ord('z') + 1) ]:
    print('{0} : {1}'.format(alpha, dict[alpha]))

Submission status: Accepted

Solution code:
import sys
cnt = {}
for line in sys.stdin:
    for l in line:
        if l.isalpha():
            c = l.lower()
            cnt[c] = cnt.get(c,0)+1

for i in range(26):
    c = chr(ord('a')+i)
    print( c, " : ", cnt.get(c,0), sep = '' )

Submission status: Accepted

Solution code:
# print(list(__import__('string').ascii_lowercase))

alp = list(__import__('string').ascii_lowercase)

d = {}

for i in alp:
	d[i] = d.get(i, 0) + 0

# print(d)

s = ''

while True:
    try:
        # listA=list(map(int,input().split()))
        s += input()
        #listA<-[1,2,2,3,1]
        #ここに逐次処理を書けばいいと思う。
    except:
        break;

for i in range(len(s)):
	c = s[i].lower()
	if c in alp:
		d[c] = d.get(c, 0) + 1

# print(d)

for k,v in d.items():
	print(k,':',v)

Submission status: Accepted

Solution code:
import sys

S = sys.stdin.read()
S = S.lower()

char_dict = {}
for i in range(97, 97+26):
    char_dict[chr(i)] = 0

for i in S:
    if 97 <= ord(i) < 97+26:
        char_dict[i] += 1

for i in range(97, 97+26):
    print("{} : {}".format(chr(i), char_dict[chr(i)]))

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.read().lower()
for ch in map(chr,range(ord('a'), ord('z') + 1)):
    print(ch, ':', s.count(ch))

Submission status: Accepted

Solution code:
# Problem - 文字のカウント

# input
S = ''
while True:
    try:
        line = input().lower()
        S += line
    except EOFError:
        break

# count
S_dic = {}
for i in range(26):
    tmp = chr(ord('a') + i)
    S_dic[tmp] = 0
for i in range(len(S)):
    c = S[i]
    if c>='a' and c<='z':
        S_dic[c] += 1

# output
for k, item in S_dic.items():
    print("%s : %d"%(k, item))

Submission status: Accepted

Solution code:
s_list = []
while True:
	try:
		s_list.append(input().lower())
	except:
		break
s = ''.join(s_list)
for t in ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']:
	print('{0} : {1}'.format(t, s.count(t)))

Submission status: Accepted

Solution code:
import collections
import string
s = ''
_s = ''
while True:
    try:
        s += str(input())
    except:
        break
s = s.lower()
c = collections.Counter(s)
for ch in string.ascii_lowercase:
    print('{} : {}'.format(ch,c[ch]))

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
line = ""
while True:
    try:
        line += input()
    except:
        break
S = defaultdict(int, Counter(line.lower()))
for a in range(ord("a"), ord("z")+1):
    print(chr(a),":",S[chr(a)])

Submission status: Accepted

Solution code:
cnt = [0]*100
while 1:
    try:
        S = input()
    except:
        break
    S = S.lower()
    for i in S:
        tmp = ord(i)%97
        cnt[tmp] += 1

for i in range(26):
    print(chr(97+i),":",cnt[i])

Submission status: Accepted

Solution code:
alphabet = dict([(chr(i), 0) for i in range(97, 123)])

while True:
    try:
        text = list(map(str.lower, input()))
        for c in text:
            if c.isalpha():
                alphabet.update({c: alphabet[c]+1})
    except:
        break

for k, v in alphabet.items():
    print(k, ":", v)

Submission status: Accepted

Solution code:
cnt = [0 for i in range(26)]
while True:
      try:
            s = input()
      except:
            break
      for i in range(len(s)):
            m = ord(s[i])-ord('A')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
            m = ord(s[i])-ord('a')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
for i in range(26):
      print(chr(i+ord('a')),":",cnt[i])

Submission status: Accepted

Solution code:
alp = list("abcdefghijklmnopqrstuvwxyz")
text = str()

while True:
    
    try:

        num = str(input().lower())
        
    except EOFError:
        break
    
    text += num

text = list(text)
for i in alp:
    x = text.count(i)
    print(f"{i} : {x}")

Submission status: Accepted

Solution code:
import sys 
cnt = {} 
for line in sys.stdin:
    for l in line:
        if l.isalpha():
            c = l.lower()
            cnt[c] = cnt.get(c,0)+1
for i in range(26):
    c = chr(ord('a')+i)
    print(f'{c} : {cnt.get(c,0)}')