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:
'''
ITP-1_8-C
 ?????????????????????
?????????????????±??????????????????????????¢???????????????????????°?????°??????????????°????????????????????????????????? 
??????????°?????????¨??§??????????????\???????????????
???Input
?????°????????????????????????????????±???????????????????????????
???Output
?????????????????±???????????????????????¢???????????????????????°?????\??????????????¢?????§????????????????????????
a : a????????°
b : b????????°
c : c????????°
  .
  .
z : z????????°
'''
# inputData
# inputData = input()
# cnt = [0]*26
# 
# for i in range(len(inputData)):
#     if "a" == inputData[i] or inputData[i] =="A":
#         cnt[0] += 1
#     elif "b" == inputData[i] or inputData[i] =="B":
#         cnt[1] += 1
#     elif "c" == inputData[i] or inputData[i] =="C":
#         cnt[2] += 1
#     elif "d" == inputData[i] or inputData[i] =="D":
#         cnt[3] += 1
#     elif "e" == inputData[i] or inputData[i] =="E":
#         cnt[4] += 1
#     elif "f" == inputData[i] or inputData[i] =="F":
#         cnt[5] += 1
#     elif "g" == inputData[i] or inputData[i] =="G":
#         cnt[6] += 1
#     elif "h" == inputData[i] or inputData[i] =="H":
#         cnt[7] += 1
#     elif "i" == inputData[i] or inputData[i] =="I":
#         cnt[8] += 1
#     elif "j" == inputData[i] or inputData[i] =="J":
#         cnt[9] += 1
#     elif "k" == inputData[i] or inputData[i] =="K":
#         cnt[10] += 1
#     elif "l" == inputData[i] or inputData[i] =="L":
#         cnt[11] += 1
#     elif "m" == inputData[i] or inputData[i] =="M":
#         cnt[12] += 1
#     elif "n" == inputData[i] or inputData[i] =="N":
#         cnt[13] += 1
#     elif "o" == inputData[i] or inputData[i] =="O":
#         cnt[14] += 1
#     elif "p" == inputData[i] or inputData[i] =="P":
#         cnt[15] += 1
#     elif "q" == inputData[i] or inputData[i] =="Q":
#         cnt[16] += 1
#     elif "r" == inputData[i] or inputData[i] =="R":
#         cnt[17] += 1
#     elif "s" == inputData[i] or inputData[i] =="S":
#         cnt[18] += 1
#     elif "t" == inputData[i] or inputData[i] =="T":
#         cnt[19] += 1
#     elif "u" == inputData[i] or inputData[i] =="U":
#         cnt[20] += 1
#     elif "v" == inputData[i] or inputData[i] =="V":
#         cnt[21] += 1
#     elif "w" == inputData[i] or inputData[i] =="W":
#         cnt[22] += 1
#     elif "x" == inputData[i] or inputData[i] =="X":
#         cnt[23] += 1
#     elif "y" == inputData[i] or inputData[i] =="Y":
#         cnt[24] += 1
#     elif "z" == inputData[i] or inputData[i] =="Z":
#         cnt[25] += 1
# 
# print ('a : %d' % (cnt[0]))
# print ('b : %d' % (cnt[1]))
# print ('c : %d' % (cnt[2]))
# print ('d : %d' % (cnt[3]))
# print ('e : %d' % (cnt[4]))
# print ('f : %d' % (cnt[5]))
# print ('g : %d' % (cnt[6]))
# print ('h : %d' % (cnt[7]))
# print ('i : %d' % (cnt[8]))
# print ('j : %d' % (cnt[9]))
# print ('k : %d' % (cnt[10]))
# print ('l : %d' % (cnt[11]))
# print ('m : %d' % (cnt[12]))
# print ('n : %d' % (cnt[13]))
# print ('o : %d' % (cnt[14]))
# print ('p : %d' % (cnt[15]))
# print ('q : %d' % (cnt[16]))
# print ('r : %d' % (cnt[17]))
# print ('s : %d' % (cnt[18]))
# print ('t : %d' % (cnt[19]))
# print ('u : %d' % (cnt[20]))
# print ('v : %d' % (cnt[21]))
# print ('w : %d' % (cnt[22]))
# print ('x : %d' % (cnt[23]))
# print ('y : %d' % (cnt[24]))
# print ('z : %d' % (cnt[25]))

import sys
string = []
for line in sys.stdin:
    string += line.lower()
A = 'abcdefghijklmnopqrstuvwxyz'
for cnt0 in A:
    print(cnt0+' : {}'.format(string.count(cnt0)))

Submission status: Accepted

Solution code:
import sys
import string

count = {}

for key in list(string.ascii_lowercase):
    count[key] = 0

for line in sys.stdin:
    for case in line:
        case = case.lower()
        if count.get(case) != None:
            count[case] += 1

keys = list(count.keys())

keys.sort()
for key in keys:
    print ("%s : %s"%(key,count[key]))

Submission status: Accepted

Solution code:
import sys

a = sys.stdin.read()
alphabet = "abcdefghijklmnopqrstuvwxyz"

for i in alphabet:
    print(i + " : " + str(a.lower().count(i)) )

Submission status: Accepted

Solution code:
import sys

#fin = open("test.txt", "r")
fin = sys.stdin

sentence = fin.read()
sentence = sentence.lower()

num_alphabet_list = [0 for i in range(26)]

for c in sentence:
	if ord(c) < ord('a') or ord(c) > ord('z'):
		continue

	num_alphabet_list[ord(c) - ord('a')] += 1

for i in range(0, 26):
	print(chr(i + ord('a')), end="")
	print(" : ", end="")
	print(num_alphabet_list[i])

Submission status: Accepted

Solution code:
#!usr/bin/env python3

import sys


def main():
    passage = str()
    alphabets = 'abcdefghijklmnopqrstuvwxyz'

    for line in sys.stdin:
        passage += line.lower()

    for alphabet in alphabets:
        print('%s : %d' % (alphabet, passage.count(alphabet)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!usr/bin/env python3

import sys


def main():
    text = str()
    alphabets = 'abcdefghijklmnopqrstuvwxyz'

    for line in sys.stdin:
        text += line.lower()

    for alphabet in alphabets:
        print('%s : %d' % (alphabet, text.count(alphabet)))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sentence = ''

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

orda = ord('a')
ordz = ord('z')

for i in range(orda, ordz+1):
	counter = sentence.count(chr(i))
	print("{} : {}".format(chr(i), counter))

Submission status: Accepted

Solution code:
s = ""
while True:
    try:
        s += input()
    except:
        break
    
l = list(s.lower())
alphabet = list("abcdefghijklmnopqrstuvwxyz")
c = [l.count(alphabet[i]) for i in range(26)]
for i in range(26):
    print("{} : {}".format(alphabet[i],c[i]))

Submission status: Accepted

Solution code:
str = ''
while True:
    try:
        sent = raw_input()
    except:
        break
    str += sent.lower()

for i in range(ord('a'),ord('z')+1):
    print "%s : %d" %(chr(i),str.count(chr(i)))

Submission status: Accepted

Solution code:
import sys

alp = "abcdefghijklmnopqrstuvwxyz"
s = []
for line in sys.stdin:
    s += line.lower()
for i in alp:
    print(i + " : " +str(s.count(i)))

Submission status: Accepted

Solution code:
import sys
word = [chr(i) for i in range(97, 97+26)]
word_number = []
lines = ""
for line in sys.stdin:
    lines += line

for target in word:
    count = 0
    for character in lines:
        if character.lower() == target:
            count += 1
    word_number.append(count)

for i in range(26):
    print("{0} : {1}".format(word[i],word_number[i]))

Submission status: Accepted

Solution code:
import sys

char = "abcdefghijklmnopqrstuvwxyz"
inp = sys.stdin.read()
for char_tmp in char:
    print(char_tmp + ' : ' + str(inp.lower().count(char_tmp)))

Submission status: Accepted

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

alph = "abcdefghijklmnopqrstuvwxyz"

for a in alph:
    print("{} : {}".format(a, s.count(a)))

Submission status: Accepted

Solution code:
list_str2 = [0 for i in range(26)]

while(1):
	try:
		list_str1 = list(input())
		#print(list_str1)
	except:
		break
	for i in range(len(list_str1)):
		if 97 <= ord(list_str1[i].lower()) <= 122:
			list_str2[ord(list_str1[i].lower())-97] += 1

for i in range(26):
	print(chr(97+i)+' : '+str(list_str2[i]))

Submission status: Accepted

Solution code:
sentence = ''
while True:
    try:
        sentence += input().lower()
    except:
            break
 
for i in range(ord('a'), ord('z') + 1):
    print('{} : {}'.format(chr(i),sentence.count(chr(i))))

Submission status: Accepted

Solution code:
import sys
alf = []
countchan = []
for i in range(26):
    alf.append(chr(ord("a")+i))
    countchan.append(0)
for i in sys.stdin.readlines():
    for i2 in range(26):
        countchan[i2] += i.count(chr(ord("a")+i2))
        countchan[i2] += i.count(chr(ord("A")+i2))
for i in range(26):
    print(alf[i]+" : "+str(countchan[i]))

Submission status: Accepted

Solution code:
res = []
import string
sam = string.ascii_lowercase

for mak in sam : res.append([mak,0])

import fileinput
for mak in fileinput.input() :
    for tem in mak.lower() :
        num = sam.find(tem)
        if num != -1 : res[num][1] += 1
        
for mak in range(26) : print('{} : {}'.format(res[mak][0],res[mak][1]))

Submission status: Accepted

Solution code:
chrs = [chr(i) for i in range(97,97+26)]
state = ""
while True:
    try:
        state += input()
    except:
        break
state = state.lower()
for i in chrs:
    print(i+" : "+str(state.count(i)))

Submission status: Accepted

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

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

text_out="".join(text)
text_lower=text_out.lower()

for letter in text_lower:
    if letter in count:
        count[letter] += 1

for x,y in sorted(count.items()):
    print("{0} : {1}".format(x,y))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os
from collections import defaultdict



alphabets = 'abcdefghijklmnopqrstuvwxyz'
d = defaultdict(int)

for s in sys.stdin:
    for c in s:
        c2 = c.lower()
        if c2 in alphabets:
            d[c2] += 1

for c in alphabets:
    print('{} : {}'.format(c, d[c]))

Submission status: Accepted

Solution code:
alphabet = 'abcdefghijklmnopqrstuvwxyz'
from collections import defaultdict
import sys

adict = defaultdict(int)

for l in sys.stdin:
    for c in l.lower():
        adict[c] += 1
        
for k in alphabet:
    print('%s : %i' %(k, adict[k]))

Submission status: Accepted

Solution code:
import sys

count = [0 for _ in range(26)]

for line in sys.stdin:
    array = line
    char = ["" for _ in range(len(array))]
    for i in range(len(array)):
        char[i] = array[i:i+1]
    for c in char:
        for i in range(26):
            if c == chr(i+ord("A")) or c == chr(i+ord("a")):
                count[i] += 1


for i in range(26):
    print("{0} : {1}".format(chr(i+ord("a")), count[i]))

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
 
from collections import Counter
 
def func():
    inputdata=""
    while(True):
        try:
            line=input()
            inputdata+=line
        except EOFError:
                break
        except:
            return inputError()

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

    counter=Counter(inputdata.lower())
    data=dict(counter)

    for char in alphabets_small:
        try:
            print(char+" : "+str(data[char]))
        except:
            print(char+" : 0")
    

def inputError():
    print("input Error")
    return -1
 
func()

Submission status: Accepted

Solution code:
#!/usr/bin/env python

letters = []
for i in range(26):
    letters.append(chr(i + 97) + " : ")

contents = []
while True:
    try:
        text = input()
    except EOFError:
        break
    contents.append(text)


#65-90 uppercase
#97-122lowercase
i = 0
for y in letters:
    value = 0
    for text in contents:
        for x in text:
            if x.isupper():
                x = x.lower()
                if x in y:
                    value += 1
            elif x.islower():
                if x in y:
                    value += 1
    letters[i] = letters[i] + str(value)
    i += 1

for x in letters:
    print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import string
from sys import stdin

chs = dict([(ch, 0) for ch in string.ascii_lowercase])

for line in stdin:
    for ch in line:
        c = ch.lower()

        if c not in chs:
            continue

        chs[c] += 1

for ch in string.ascii_lowercase:
    print(ch, ':', chs[ch])

Submission status: Accepted

Solution code:
import sys
from collections import OrderedDict
AZC = OrderedDict((chr(i), 0) for i in range(97,97+26))

import fileinput
for line in fileinput.input():
 S = line.strip().lower()
 for i in S:
  if i in AZC:
   AZC[i] += 1

for  s, n in AZC.items():
 print(s + " : " + str(n))

Submission status: Accepted

Solution code:
import sys
strs = sys.stdin.readlines()
for c in range(ord('a'), ord('z') + 1):
    count = 0
    for str in strs:
        count += str.lower().count(chr(c))
    print('{0} : {1}'.format(chr(c), count))

Submission status: Accepted

Solution code:
#coding:utf-8


mo =""
moji_m =""

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


moji = list(moji_m.lower())
moji_l = list("abcdefghijklmnopqrstuvwxyz")
moji_c = [0 for i in range(26)]

for i in moji:
    #??¢??????????????????????????????
    if i.isalpha() == False:
        pass
    else:
        moji_c[moji_l.index(i)] += 1

for i in range(26):
    print(str(moji_l[i]) + " : " +str(moji_c[i]))

Submission status: Accepted

Solution code:
#coding:utf-8


mo =""
moji_m =""

while True:
    try:
        mo = input().rstrip().lower()
        moji_m += mo
    except:
        break


moji = list(moji_m.lower())
moji_l = list("abcdefghijklmnopqrstuvwxyz")
moji_c = [0 for i in range(26)]

for i in moji:
    #??¢??????????????????????????????
    if i.isalpha() == False:
        pass
    else:
        moji_c[moji_l.index(i)] += 1

for i in range(26):
    print(str(moji_l[i]) + " : " +str(moji_c[i]))

Submission status: Accepted

Solution code:
import sys
alp = [["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]]
for line in sys.stdin:
    s = line.lower()
    for i in range(len(s)):
        for j in range(len(alp)):
            if s[i] == alp[j][0]:
                alp[j][1] += 1
                break
for i in range(len(alp)):
    print("{0} : {1}".format(alp[i][0], alp[i][1]))

Submission status: Accepted

Solution code:
dic = {}
while True:
    try:
        line = raw_input()
    except:
        break
    for i in line.lower():
        if i in dic:
            dic[i] += 1
        else:
            dic[i] = 1

for i in xrange(97, 123):
    output = 0
    if chr(i) in dic:
        output = dic[chr(i)]
    print "%s : %d" % (chr(i), output)

Submission status: Accepted

Solution code:
import sys
s=""
for line in sys.stdin:
    s+=line.lower()
alphabet=list("abcdefghijklmnopqrstuvwxyz")
for i in alphabet:
    print("{} : {}".format(i, s.count(i)))

Submission status: Accepted

Solution code:
import sys
strs = sys.stdin.readlines()
for c in range(ord('a'), ord('z') + 1):
    count = 0
    for s in strs:
        count += s.lower().count(chr(c))
    print('{0} : {1}'.format(chr(c), count))

Submission status: Accepted

Solution code:
import sys

charas = 'abcdefghijklmnopqrstuvwxyz'

data = []
for line in sys.stdin:
    data.append(line)
for chara in charas:
    cnt = 0
    for row in data:
        cnt += row.count(chara)
        cnt += row.count(chara.upper())
    print('{} : {}'.format(chara, cnt))

Submission status: Accepted

Solution code:
try:
    a=""
    while True:
        S=input()
        if not S:
            break
        S=S.lower()
        a=a+S
except EOFError:
    pass
for i in range(97,97+26):
    
    b=a.count(chr(i))
    print(chr(i)+" : "+str(b))

Submission status: Accepted

Solution code:
try:
    a=""
    while True:
        S=input()
        if not S:
            break
        S=S.lower()
        a=a+S
except EOFError:
    pass
for i in range(97,97+26):
    b=a.count(chr(i))
    print(chr(i)+" : "+str(b))

Submission status: Accepted

Solution code:
import string
import sys

table = {c: 0 for c in string.ascii_lowercase}

for raw in sys.stdin.read():
    c = raw.lower()
    if c in string.ascii_lowercase:
        table[c] += 1

for key in string.ascii_lowercase:
    print('{:s} : {:d}'.format(key, table[key]))

Submission status: Accepted

Solution code:
sen = ''
while True:
    try:
        sen += input().lower()
    except:
        break
res = [0 for i in range(26)]
for c in sen:
    if 'a' <= c <= 'z':
        res[ord(c)-ord('a')] += 1
alp = [chr(i) for i in range(ord('a'), ord('z')+1)]
for i in range(26):
    print(alp[i] + ' : ' + str(res[i]))

Submission status: Accepted

Solution code:
import sys
import re
from collections import Counter

chardict = {chr(i):0 for i in range(97, 97+26)}
str1 = sys.stdin.read()
str1 = re.sub('[^a-z]', '', str1.lower())
counter = Counter(str1)
for word in counter:
    chardict[word] = counter[word]
charlist = sorted(chardict.items())
for x in charlist:
    print(x[0] + ' : ' + str(x[1]))

Submission status: Accepted

Solution code:
s=[int(0) for i in range(26)]
while True:
    try:
        x=input()
        for i in range(len(list(x))):
            if 97<=ord(list(x)[i].lower())<=122:
                s[ord(list(x)[i].lower())-97]=s[ord(list(x)[i].lower())-97]+1
    except EOFError:
        break
for i in range(26):
    print(chr(97+i),":",s[i])

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
??§???????°?????????????
"""
import sys

lower = "abcdefghijklmnopqrstuvwxyz"
upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
inp = sys.stdin.read() # EOF?????§????????????
inp = inp.translate(str.maketrans(upper,lower))

for i in lower:
    print("{0} : {1}".format(i,inp.count(i)))

Submission status: Accepted

Solution code:
from string import ascii_lowercase as letters
import sys
data = sys.stdin.read().lower()

num = [data.count(s) for s in letters]
ans = '\n'.join(['{0} : {1}'.format(s,n) for s,n in zip(list(letters),num)])
print(ans)

Submission status: Accepted

Solution code:
try:
	s = ''
	while True:
		s = s + input().lower()
except EOFError:
	[print(chr(o)+' : '+str(s.count(chr(o)))) for o in range(ord('a'),ord('z')+1)]

Submission status: Accepted

Solution code:
def main():
    S = ''
    while True:
        try:
            S = S + input()
        except:
            break

    s = S.lower()
    for i in range(97, 123):
        c = chr(i)
        n = s.count(c)
        print('{} : {}'.format(c, n))

main()

Submission status: Accepted

Solution code:
s = ""
while True:
    try:
        sent = input()
    except:
        break
    s += sent
    
ch=['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']

sl=s.lower()

for c in ch:
    cnt=sl.count(c)
    print("{} : {}".format(c,cnt))

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:
import sys

dic = {}
for i in range(ord('a'), ord('z') + 1):
    dic[chr(i)] = 0

for line in sys.stdin:
    for i in range(len(line)):
        char = line[i].lower()
        if char in dic.keys():dic[char] += 1

for i in range(ord('a'), ord('z') + 1):
    print("{} : {}".format(chr(i), dic[chr(i)]))

Submission status: Accepted

Solution code:
import sys

Target = ""
for line in sys.stdin:
    Target += line
for i in range(26):
    print(chr(i + 97), ":", Target.lower().count(chr(i + 97)))

Submission status: Accepted

Solution code:
z=''
while True:
    try:
        z += input()
    except EOFError:
        break
a = []
b = 0
for i in z:
    if i.isupper():
        a += i.lower()
    a += i
al = [chr(i) for i in range(97, 97 + 26)]
for i in al:
    b = str(a.count(i))
    print('{} : {}'.format(i,b))

Submission status: Accepted

Solution code:
text = []
try:
    while True:
        text.append(input())
except:
    for s in [chr(k) for k in range(97,97+26)]:
        count = 0
        for i in text:
            count += i.lower().count(s)
        print(s,":",count)

Submission status: Accepted

Solution code:
s=''
try:
  while True:
   sentence=input()
   s+=sentence
except:
    pass
    sentence2=s.lower()
    for i in[chr(i) for i in range(97,97+26)]:
     print(i,':',sentence2.count(i))

Submission status: Accepted

Solution code:
try:
    text = ""
    while True:
        text += input()
except:
    for s in [chr(k) for k in range(97,97+26)]:
        print(s,":",text.lower().count(s))

Submission status: Accepted

Solution code:
s=''
try:
  while True:
   sentence=input()
   s+=sentence.lower()
except:
    for i in[chr(i) for i in range(97,97+26)]:
     print(i,':',s.count(i))

Submission status: Accepted

Solution code:
import string
x = ''
allcase = string.ascii_lowercase
while True:
    try: x+=input().lower()
    except:break
for letter in allcase:
    print(letter + " : " + repr(x.count(letter)))

Submission status: Accepted

Solution code:
l = 'abcdefghijklmnopqrstuvwxyz'
mp = [0 for _ in list(l)]

while True:
    try:
        in_data = list(filter(lambda x: 97 <= ord(x) <= 122 , raw_input().lower()))
    except:
        break

    for s in in_data:
        mp[ord(s) - 97] += 1

for i,j in zip(l, mp):
    print "%s : %s" % (i, j)

Submission status: Accepted

Solution code:
# Aizu Problem ITP_1_8_C: Counting Characters
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


letters = [chr(k) for k in range(97, 123)]
count = {char: 0 for char in letters}
for line in sys.stdin:
    for char in line.lower():
        if char in letters:
            count[char] += 1

for char in letters:
    print(char, ':', count[char])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
s=''
while True:
    try:
        s += input().lower()
    except:
        break
 
alph = "abcdefghijklmnopqrstuvwxyz"
 
for a in alph:
    print("{} : {}".format(a, s.count(a)))

Submission status: Accepted

Solution code:
import sys

az = [0 for i in range(26)]
s = sys.stdin.read().lower()
l = [ord(i) for i in s]

for i in range(len(l)):
    c = l[i] - 97
    if(c >= 0 and c <= 26):
        az[c] += 1

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

Submission status: Accepted

Solution code:
import sys
 
string = str()
 
for line in sys.stdin:
    string += line.lower()

alph = ['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 letter in alph:
	sum = 0
	n = -1
	while True:
		n = string.find(letter, n + 1)
		if n == -1:
			break
		sum += 1
	print("{} : {}".format(letter, sum))

Submission status: Accepted

Solution code:
import sys

alphabet = ['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']
cnt = 26 * [0]
Input = ""
loop = True

#while loop:
#    I = input()
#    if not I:
#        loop = False
#    Input += I

for I in sys.stdin:
    Input += I

for i1 in range(len(alphabet)):
    for i2 in range(len(Input)):
        if 'A' <= Input[i2] <= 'Z':
            w = Input[i2].lower()
        else:
            w = Input[i2]
        if alphabet[i1] == w:
            cnt[i1] += 1
    print(alphabet[i1] + " : " + str(cnt[i1]))

Submission status: Accepted

Solution code:
import sys

alphabet = ['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']
cnt = 26 * [0]
Input = ""
loop = True

for I in sys.stdin:
    Input += I

for i1 in range(len(alphabet)):
    for i2 in range(len(Input)):
        if 'A' <= Input[i2] <= 'Z':
            w = Input[i2].lower()
        else:
            w = Input[i2]
        if alphabet[i1] == w:
            cnt[i1] += 1
    print(alphabet[i1] + " : " + str(cnt[i1]))

Submission status: Accepted

Solution code:
import sys
STRING = ""
for line in sys.stdin:
    STRING += line.lower()
CHRS = ['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 CHRS:
    print("%s : %d" % (i, STRING.count(i)))

Submission status: Accepted

Solution code:
import sys
alpha = "abcdefghijklmnopqrstuvwxyz"
cnt_dict = { key:0 for key in alpha}
string = sys.stdin.read().lower()
for i in alpha:
    print("{0} : {1}".format(i, string.count(i)))

Submission status: Accepted

Solution code:
from collections import OrderedDict

d = OrderedDict((chr(i), 0) for i in range(ord('a'), ord('a')+26))

while True:
    try:
        s = input()
    except EOFError:
        break
    else:
        for c in s.lower():
            if c in d:
                d[c] += 1

for k, v in d.items():
    print("{} : {}".format(k, v))

Submission status: Accepted

Solution code:
number_of_letter={'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}

while True:
    letters=''
    try:
        letters=input()
    except:
        break

    letters=letters.lower()
    number_of_letter['a']+=letters.count('a')
    number_of_letter['b']+=letters.count('b')
    number_of_letter['c']+=letters.count('c')
    number_of_letter['d']+=letters.count('d')
    number_of_letter['e']+=letters.count('e')
    number_of_letter['f']+=letters.count('f')
    number_of_letter['g']+=letters.count('g')
    number_of_letter['h']+=letters.count('h')
    number_of_letter['i']+=letters.count('i')
    number_of_letter['j']+=letters.count('j')
    number_of_letter['k']+=letters.count('k')
    number_of_letter['l']+=letters.count('l')
    number_of_letter['m']+=letters.count('m')
    number_of_letter['n']+=letters.count('n')
    number_of_letter['o']+=letters.count('o')
    number_of_letter['p']+=letters.count('p')
    number_of_letter['q']+=letters.count('q')
    number_of_letter['r']+=letters.count('r')
    number_of_letter['s']+=letters.count('s')
    number_of_letter['t']+=letters.count('t')
    number_of_letter['u']+=letters.count('u')
    number_of_letter['v']+=letters.count('v')
    number_of_letter['w']+=letters.count('w')
    number_of_letter['x']+=letters.count('x')
    number_of_letter['y']+=letters.count('y')
    number_of_letter['z']+=letters.count('z')

for i in range(97,123):
    print(chr(i),':',number_of_letter[chr(i)])

Submission status: Accepted

Solution code:
a=[0]*26
w='abcdefghijklmnopqrstuvwxyz'
try:
    while True:
        s=list(input().upper())
        for i in s:
            if i=='A':
                a[0]+=1
            elif i=='B':
                a[1]+=1
            elif i=='C':
                a[2]+=1
            elif i=='D':
                a[3]+=1
            elif i=='E':
                a[4]+=1
            elif i=='F':
                a[5]+=1
            elif i=='G':
                a[6]+=1
            elif i=='H':
                a[7]+=1
            elif i=='I':
                a[8]+=1
            elif i=='J':
                a[9]+=1
            elif i=='K':
                a[10]+=1
            elif i=='L':
                a[11]+=1
            elif i=='M':
                a[12]+=1
            elif i=='N':
                a[13]+=1
            elif i=='O':
                a[14]+=1
            elif i=='P':
                a[15]+=1
            elif i=='Q':
                a[16]+=1
            elif i=='R':
                a[17]+=1
            elif i=='S':
                a[18]+=1
            elif i=='T':
                a[19]+=1
            elif i=='U':
                a[20]+=1
            elif i=='V':
                a[21]+=1
            elif i=='W':
                a[22]+=1
            elif i=='X':
                a[23]+=1
            elif i=='Y':
                a[24]+=1
            elif i=='Z':
                a[25]+=1 

except EOFError:
    pass

for i in range(26):
    print(w[i:i+1], ':', str(a[i]))

Submission status: Accepted

Solution code:
a=[0]*26
w='abcdefghijklmnopqrstuvwxyz'
try:
    while True:
        s=list(raw_input().upper())
        for i in s:
            if i=='A':
                a[0]+=1
            elif i=='B':
                a[1]+=1
            elif i=='C':
                a[2]+=1
            elif i=='D':
                a[3]+=1
            elif i=='E':
                a[4]+=1
            elif i=='F':
                a[5]+=1
            elif i=='G':
                a[6]+=1
            elif i=='H':
                a[7]+=1
            elif i=='I':
                a[8]+=1
            elif i=='J':
                a[9]+=1
            elif i=='K':
                a[10]+=1
            elif i=='L':
                a[11]+=1
            elif i=='M':
                a[12]+=1
            elif i=='N':
                a[13]+=1
            elif i=='O':
                a[14]+=1
            elif i=='P':
                a[15]+=1
            elif i=='Q':
                a[16]+=1
            elif i=='R':
                a[17]+=1
            elif i=='S':
                a[18]+=1
            elif i=='T':
                a[19]+=1
            elif i=='U':
                a[20]+=1
            elif i=='V':
                a[21]+=1
            elif i=='W':
                a[22]+=1
            elif i=='X':
                a[23]+=1
            elif i=='Y':
                a[24]+=1
            elif i=='Z':
                a[25]+=1 

except EOFError:
    pass

for i in range(26):
    print w[i:i+1], ':', str(a[i])

Submission status: Accepted

Solution code:
import sys

alpha = 'abcdefghijklmnopqrstuvwxyz'
dic = {c:0 for c in alpha}

t = sys.stdin.read()

for s in t:
    s = s.lower()
    if s in alpha:
        dic[s] += 1

for i in sorted(dic):
    print("{} : {}".format(i,dic[i]))

Submission status: Accepted

Solution code:
import sys
s = (sys.stdin.read()).lower()
for i in range(97,97+26):
    print('%s : %d' %(chr(i), s.count(chr(i))))

Submission status: Accepted

Solution code:
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z')+1)]

ans=dict(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for (key, val) in sorted(ans.items()):
  print(key ,":" , val)

Submission status: Accepted

Solution code:
import sys

counter = {k: 0 for k in  "abcdefghijklmnopqrstuvwxyz"}

while True:
    try:
        line = raw_input()
    except:
        break
    for i in line.lower():
        if i in counter.keys():
            counter[i] += 1
for k in sorted(counter.keys()):
    print "{} : {}".format(k,counter[k])