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: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
if __name__ == "__main__":
    #while True:

    #if not input_word:
    #    break
    alphabetical_table = {}
    for i in range(ord("a"),ord("z")+1):
        alphabetical_table[chr(i)] = 0

    input_word = input().lower()
    #input_word = input_word.lower()
    for ch in input_word:
        if ch.isalpha() == True:
            alphabetical_table[ch] += 1
    sortedKeys = sorted(alphabetical_table.keys())
    for key in sortedKeys:
        print("{} : {}".format(key, alphabetical_table[key]))

Submission status: Wrong Answer

Solution code:
import string
c = {}
for x in raw_input():
    if not x.isalpha():
        continue
    c[x] = c.get(x, 0) + 1

for x in string.ascii_lowercase:
    print("%s : %d" % (x, c.get(x, 0)))

Submission status: Wrong Answer

Solution code:
import string
c = {}
for x in raw_input().lower():
    if not x.isalpha():
        continue
    c[x] = c.get(x, 0) + 1

for x in string.ascii_lowercase:
    print("%s : %d" % (x, c.get(x, 0)))

Submission status: Wrong Answer

Solution code:
s = ''.join([s.lower() for s in raw_input()])

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Submission status: Wrong Answer

Solution code:
s = ''.join([s.lower() for s in raw_input() if s!=[]])

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Submission status: Wrong Answer

Solution code:
t=list(raw_input().lower())
c=[0 for i in range(26)]
for i in range(len(t)):
        if 0<=ord(t[i])-ord("a")<=25:
                c[ord(t[i])-ord("a")]+=1
for i in range(26):
        print chr(ord("a")+i),":",c[i]

Submission status: Wrong Answer

Solution code:
dic = [['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]]  
s = raw_input()
for i in s:
	for j in range(0, 26):
		if dic[j][0] == i.lower():
			dic[j][1] += 1
			break
for i in range(0, 26):
	print dic[i][0], ':', dic[i][1]

Submission status: Wrong Answer

Solution code:
dic = [['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]]  
s = raw_input()
for i in s:
	for j in range(0, 26):
		if dic[j][0] == i.lower():
			dic[j][1] += 1
			break
for i in range(0, 26):
	print dic[i][0], ':', dic[i][1]
print 'test'

Submission status: Wrong Answer

Solution code:
a = raw_input()
b = [0]*26
for i in a:
    c = ord(i.lower())
    if c>= ord("a") and c <= ord("z"):
        b[c-ord("a")] +=1
for i,v in enumerate(b):
    print "{0} : {1}".format(chr(i+ord("a")),v)

Submission status: Wrong Answer

Solution code:
alpha = {x:0 for x in 'abcdefghijklmnopqrstuvwxyz'}
for s in raw_input():
    if s == '.': break
    elif s == ' ': continue
    print s, s.lower()
    alpha[s.lower()] += 1
for k, v in alpha.items():
    print k,':',v

Submission status: Wrong Answer

Solution code:
alpha = {x:0 for x in 'abcdefghijklmnopqrstuvwxyz'}
for s in raw_input():
    if s == '.': break
    elif s == ' ': continue
    alpha[s.lower()] += 1
for k, v in alpha.items():
    print k,':',v

Submission status: Wrong Answer

Solution code:
alpha = {x:0 for x in 'abcdefghijklmnopqrstuvwxyz'}
for s in raw_input():
    if s == '.': break
    elif s == ' ': continue
    alpha[s.lower()] += 1
for k in 'abcdefghijklmnopqrstuvwxyz':
    print k,':',alpha[k]

Submission status: Wrong Answer

Solution code:
az = ["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",]
sum_az = [0 for x in range(26)]

while True:
    x = raw_input()
    if x.find(".") != -1:
        break

    x.lower()
    for i in range(26):
        for j in range(len(x)):
            if x[j] == az[i]:
                sum_az[i] += 1

for i in range(26):
    print ("%s : %d" % (az[i], sum_az[i]))

Submission status: Wrong Answer

Solution code:
az = ["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"]
sum_az = [0 for x in range(26)]

while True:
    x = raw_input()
    if x.find(".") != -1:
        break

    x.lower()
    for i in range(26):
        for j in range(len(x)):
            if x[j] == az[i]:
                sum_az[i] += 1

for i in range(26):
    print ("%s : %d" % (az[i], sum_az[i]))

Submission status: Wrong Answer

Solution code:
az = ["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"]
sum_az = [0 for x in range(26)]

while True:
    x = raw_input()
    x.lower()
    for i in range(26):
        for j in range(len(x)):
            if x[j] == az[i]:
                sum_az[i] += 1

    if x.find(".") != -1:
        break

for i in range(26):
    print ("%s : %d" % (az[i], sum_az[i]))

Submission status: Wrong Answer

Solution code:
s = input().lower()
for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Submission status: Time Limit Exceeded

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

text=[]
text_out=""
while True:
    try:
        text.append(input())
    except EOFError:
        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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys

s = ''
while True:
    try:
        s += sys.stdin.readline().lower()
    except:
        break

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Submission status: Memory Limit Exceeded

Solution code:
import sys
n = []
while True:
    c = list(sys.stdin.readline().lower())
    if c == ["\n"]:
        break
    n.append(c)

a = ""
for i in n:
    a = a + "".join(i)
n = list(a)
charac = []
for j in range(97,97+26):
    m= 0
    for i in range(0,len(n)):
        if ord(n[i]) == j:
            m += 1
        charac.append("{} : {}".format(chr(j),m))

for i in range(0,26):
	print(charac[i])

Submission status: Memory Limit Exceeded

Solution code:
import sys
n = []
while True:
    c = list(sys.stdin.readline().lower())
    if c == [""]:
        break
    n.append(c)

a = ""
for i in n:
    a = a + "".join(i)
n = list(a)
charac = []
for j in range(97,97+26):
    m= 0
    for i in range(0,len(n)):
        if ord(n[i]) == j:
            m += 1
        charac.append("{} : {}".format(chr(j),m))

for i in range(0,26):
	print(charac[i])

Submission status: Accepted

Solution code:
import string
import sys


def main():
    str1 = sys.stdin.read()
    dict1 = {}
    for char in str1.lower():
        if not char.isalpha():
            continue
        elif dict1.__contains__(char):
            dict1[char] += 1
        else:
            dict1[char] = 1
    for char in string.ascii_lowercase:
        print(char + ' : ' + (str(dict1[char]) if dict1.__contains__(char) else '0'))


if __name__ == '__main__':
    main()

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
def main():

    cnt = {}
    for i in range(97,123):
        cnt[chr(i)] = 0
    # print(cnt)

    for passages in sys.stdin:
        for psg in passages:
            psglower = psg.lower()
            for s in psglower:
                if s.isalpha():
                    cnt[s] += 1

    for i in range(97,123):
        s = chr(i)
        print(s, ':', cnt[s])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def main():

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

    for passages in sys.stdin:
        for psg in passages:
            psglower = psg.lower()
            for s in psglower:
                if s.isalpha():
                    cnt[s] += 1

    for i in range(ord('a'),ord('z')+1):
        s = chr(i)
        print(s, ':', cnt[s])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

cnt = {}

for line in sys.stdin:
    for s in line:
        if s.isalpha():
            c = s.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
import string

def main():
    chars = {x:0 for x in string.ascii_lowercase}

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

    for ch in string.ascii_lowercase:
        print(ch+" : "+str(chars[ch]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
bigALlist = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
smoALlist = list('abcdefghijklmnopqrstuvwxyz')
cnt = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
while True:
    try:
        text = list(input())
        for j in range(len(bigALlist)):
            for i in text:
                if (bigALlist[j] in i) or (smoALlist[j] in i):
                    cnt[j] = cnt[j] + 1
    except EOFError:
        break
for j in range(len(bigALlist)):
    print('{0} : {1}'.format(smoALlist[j],cnt[j]))

Submission status: Accepted

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

while True:
    try:
        text += input().lower()
    except:
        break
        
for key in alpha:
        print('{} : {}'.format(key, text.count(key)))

Submission status: Accepted

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

while True:
    try:
        text += input().lower()
    except:
        break
 
[print('{} : {}'.format(key, text.count(key))) for key in alpha]

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:
import sys
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"]
C = []
b = ""
for line in sys.stdin:
    a = line.lower()
    b += a
for i in range(len(alpha)):
    k = b.count(alpha[i])
    C.append(k)
for i in range(len(alpha)):
    print(alpha[i]+" :",C[i])

Submission status: Accepted

Solution code:
# coding: utf-8
import string
d = {}
for ch in list(string.ascii_lowercase):
    d[ch] = 0
    
while True:
    try:
        s = list(input().lower())
    except EOFError:
        break
    
    
    for ch in s:
        if ch.isalpha():
            d[ch] += 1
        else:
            pass
    

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.read()
s = s.lower()
c = 97
while chr(c-1)!='z':
    print('{0} : {1}'.format(chr(c),s.count(chr(c))))
    c += 1

Submission status: Accepted

Solution code:
from string import ascii_lowercase
import sys
table = dict(zip(ascii_lowercase, [0 for _ in range(len(ascii_lowercase))]))

for s in sys.stdin:
    for c in s:
        if c.lower() in table:
            table[c.lower()] += 1
for k, v in table.items():
    print("{} : {}".format(k, v))

Submission status: Accepted

Solution code:
from string import ascii_lowercase, ascii_uppercase
s = open(0).read()
ans = [0]*26
for c in s:
    i = ascii_lowercase.find(c)
    if i > -1:
        ans[i] += 1
    i = ascii_uppercase.find(c)
    if i > -1:
        ans[i] += 1
for c, t in zip(ascii_lowercase, ans):
    print("%s : %d" % (c, t))

Submission status: Accepted

Solution code:
alp_count = [0]*26



string = open(0).read()
string = string.lower()


alp = [chr(ord("a")+i) for i in range(26)]

c = 0

for j in range(26):
    c = string.count(alp[j])
    alp_count[j] += c
    print("%s : %d"%(alp[j],alp_count[j]))

Submission status: Accepted

Solution code:
import sys
input_str = sys.stdin.read()
table = [0]*26
letters = "abcdefghijklmnopqrstuvwxyz"
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:
import sys
s=sys.stdin.read().lower()

for i in range(26):


    s.count(chr(97+i))

    print(chr(97+i)+" : "+str(s.count(chr(97+i))))

Submission status: Accepted

Solution code:
import sys
import string

count = {k : 0 for k in string.ascii_lowercase}
for c in sys.stdin.read().lower():
    if c.islower():
        count[c] = count[c] + 1
for k, v in count.items():
    print(f"{k} : {v}")

Submission status: Accepted

Solution code:
import sys
import string

count = {k : 0 for k in string.ascii_lowercase}
for c in list(sys.stdin.read().lower()):
    if c.islower():
        count[c] = count[c] + 1
for k, v in count.items():
    print(f"{k} : {v}")

Submission status: Accepted

Solution code:
from sys import stdin
from string import ascii_lowercase

count_let = {k : 0 for k in ascii_lowercase}

s = list(stdin.read().rstrip().lower())
for c in s:
    count_let[c] = count_let.get(c, 0)+1

for k, v in sorted(count_let.items()):
    if k in ascii_lowercase:
        print("{} : {}".format(k, v))

Submission status: Accepted

Solution code:
import sys
data = sys.stdin.read()
letters = 'abcdefghijklmnopqrstuvwxyz'
for letter in letters:
    count = 0
    for d in data:
        if letter == d.lower():
            count += 1
    print(f'{letter} : {count}')

Submission status: Accepted

Solution code:
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']

dic = {}
for c in alphabet:
	dic[c] = 0

while True:
	try:
		string = list(input().rstrip().lower())
	except EOFError:
		break

	for c in string:
		if c in alphabet:
			dic[c] = dic[c] + 1

for key in dic:
	print('{} : {}'.format(key, dic[key]))

Submission status: Accepted

Solution code:
import sys
l = ""
for i in sys.stdin.readlines():
    l += i.lower().rstrip()
word = "abcdefghijklmnopqrstuvwxyz"
for i in word:
    n = l.count(i)
    print("{} : {}".format(i,n))

Submission status: Accepted

Solution code:
text = ""
while 1:
    try:
        x = input()
        text += x
    except EOFError:
        break
text_new = text.lower()
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"]
for i in alphabet:
    tmp = 0
    for j in text_new:
        if j == i:
            tmp += 1
    print(i + " : " + str(tmp))

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

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

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

for i in alp:
	num=0
	for j in s:
		if i==j:
			num+=1
	print(i+' : '+str(num))

Submission status: Accepted

Solution code:
import string
import sys
text = sys.stdin.read().lower()
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))

Submission status: Accepted

Solution code:
moji=""
while True:
	try:
		t = input()
		moji += t.lower()
	except :
		break
moji2 = [chr(i) for i in range(97,97+26)]

for j in moji2:
	print(j+" : "+str(moji.count(j)))

Submission status: Accepted

Solution code:
table = [0] * 26
string = []
while True:
  try:
    string += list(input())
  except EOFError:
    break

for s in string:
  n = ord(s.lower()) - 97
  if n >= 0 and n <= 25:
    table[n] += 1

for idx, s in enumerate(table):
  print(chr(idx + 97) + " : " + str(s))

Submission status: Accepted

Solution code:
letter="abcdefghijklmnopqrstuvwxyz"
table=[0]*26
while True:
    try:
        input_str=input()
    except:
        break
    for A in input_str:
        index=0
        for B in letter:
            if A == B or A == B.upper():
                table[index] += 1
                break
            index += 1

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

Submission status: Accepted

Solution code:
a = "abcdefghijklmnopqrstuvwxyz"
b = ''
while 1:
    try:
        b += input().lower()
    except:
        break
for i in range(26):
    print(a[i],':',b.count(a[i]))

Submission status: Accepted

Solution code:
#coding: UTF-8
import sys

table = [0]*26

letters = [chr(i) for i in range(97, 97+26)]
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:
st=[]

while True:
  try:
    n=input()
    if n=="":
      break
    st += n.lower()
  except:
    break
   
char = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(char)):
  print(char[i],":",st.count(char[i]))

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:
import sys
x = ""
x = sys.stdin.read()
# while True:
#     x += str(input())
#     t = time.time()

alist = list(x)
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"]
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"]
aa = [0]*27
for num in alist:
    itr =0
    for alp in alphabet:
        if num == alp:
            aa[itr] += 1
            break;
        itr += 1
    itr = 0
    for ALP in ALPHABET:
        if num == ALP:
            aa[itr] += 1
            break;
        itr += 1
for i in range(26):
    print("{} : {}".format(alphabet[i], aa[i]))

Submission status: Accepted

Solution code:
import sys

data = sys.stdin.read()
for i in range(0x61,0x7b):
    print("%c : %d"  %(i,data.lower().count(chr(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:
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:
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:
D = [0 for i in range(26)]
while True:
    s = ''
    try:
        s = raw_input()
    except (EOFError):
        break
        
    for c in s:
        d = ord(c)
        idx = -1
        if d >= ord('a') and d <= ord('z'):
            idx = d - ord('a')
        if d >= ord('A') and d <= ord('Z'):
            idx = d - ord('A')
        if idx >= 0:
            D[idx] = D[idx] + 1

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

Submission status: Accepted

Solution code:
s = ""
while True:
    try:
        x = raw_input()
    except:
        break
    s += x
s = s.lower()

for i in range(26):
    c = chr(i + ord('a'))
    print('%s : %d' %(c, s.count(c)))

Submission status: Accepted

Solution code:
s = ""
while True:
    try:
        x = raw_input().lower()
    except:
        break
    s += x

for i in range(26):
    c = chr(i + ord('a'))
    print('%s : %d' %(c, s.count(c)))

Submission status: Accepted

Solution code:
s = []
while 1:
	try :
		x = raw_input()
	except :
		break
	s.append(x.lower())
s = ''.join(s)

for i in range(26):
	c = chr(i + 97)
	print '%s : %d' % (c , s.count(c))

Submission status: Accepted

Solution code:
import sys
l=[0]*26
for h in sys.stdin:
    for i in h:
        k=ord(i.lower())
        if 96<k<123:l[k-97]+=1
for i in range(26):print chr(i+97),':',l[i]

Submission status: Accepted

Solution code:
a = 'abcdefghijklmnopqrstuvwxyz'
b = [0 for i in range(len(a))]
while True:
	try:
		S = raw_input().lower()
	except:
		break
	for j in range(26):
		b[j] += S.count(a[j])
for i in range(len(a)):
	print str(a[i])+" : "+str(b[i])

Submission status: Accepted

Solution code:
import string
az = list(string.ascii_lowercase)
li = [0 for a in range(len(az))]

while True:
    try:
        a = raw_input()
        for b in list(a):
            if b.lower() in az:
                tmp = az.index(b.lower())
                li[tmp] = li[tmp] + 1
    except:
        break

for c in range(len(az)):
    print az[c] + ' : ' + str(li[c])

Submission status: Accepted

Solution code:
import sys, string

lines = []
for line in sys.stdin:
    lines.append(line)

text = ''.join(lines).lower()
    
for char in string.ascii_lowercase:
    print("{} : {}".format(char, text.count(char)))

Submission status: Accepted

Solution code:
keys = ([chr(x) for x in range(ord('a'), ord('a') + 26)])
counts = {x:0 for x in keys}

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

    for i in range(len(text)):
        target = text[i].lower()
        if 'a' <= target <= 'z':
            counts[target] += 1

for k in keys:
    print(k, counts[k], sep=' : ')

Submission status: Accepted

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

while True:
    try:
        for text in input():
            for i in range(len(text)):
                if text[i].lower() in alphabetTable:
                    alphabetTable[text[i].lower()] += 1
    except EOFError:
        break

for r in sorted(alphabetTable):
    print(r,':',alphabetTable[r])

Submission status: Accepted

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

while True:
    try:
        text = input()
        for x in text:
            if ord('a') <= ord(x) <= ord('z') or ord('A') <= ord(x) <= ord('Z'):
                a[ord(x.lower())] += 1
    except EOFError:
        break

for x in range(ord('a'), ord('z') + 1):
    print(chr(x), ':', a[x])

Submission status: Accepted

Solution code:
s = ""
while True:
    try:
        x = raw_input().lower()
    except:
        break
    s += x
 
for i in range(26):
    c = chr(i + ord('a'))
    print('%s : %d' %(c, s.count(c)))

Submission status: Accepted

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

while True:
    try:
        x = raw_input()
    except:
        break
    for i in range(len(x)):
        if(ord('a') <= ord(x[i]) and ord(x[i]) <= ord('z')):
            count[(ord(x[i])-ord('a'))] += 1
        elif(ord('A') <= ord(x[i]) and ord(x[i]) <= ord('Z')):
            count[(ord(x[i])-ord('A'))] += 1

for i in range(26):
    print '%s : %d' %(chr(i+ord('a')), count[(i)])
exit(0)

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.read()
for c in [chr(i) for i in range(97,97+26)]:
    print(c, ":", s.lower().count(c))

Submission status: Accepted

Solution code:
alphabet = 'abcdefghijklmnopqrstuvwxyz'
dic = {}
for ch in alphabet:
    dic[ch] = 0
    
while True:
    try:
        st = raw_input()
    except EOFError:
        break

    for ch in st:
        try:
            dic[ch.lower()] +=1
        except:
            pass
for k in sorted(dic.keys()):
    print k +' : ' + str(dic[k])

Submission status: Accepted

Solution code:
import collections
import string

def solve(s):
    s = s.lower()
    counter = collections.Counter(s)
    lows = string.ascii_lowercase
    cnt = [counter[ch] for ch in lows]
    for (ch, n) in zip(lows, cnt):
        print('{0} : {1}'.format(ch, n))

if __name__ == '__main__':
    s = ''
    while True:
        try:
            s += input()
        except:
            break
    solve(s)

Submission status: Accepted

Solution code:
#coding:utf-8
#1_8_C 2015.4.8
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
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0

lines = sys.stdin.readlines()
for i in range( len( lines ) ):
	for j in range( len( lines[i] ) ):
	    if lines[i][j].isalpha():
	        chash[ lines[i][j].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Submission status: Accepted

Solution code:
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0
 
for line in sys.stdin:
    for i in range( len( line ) ):
        if line[i].isalpha():
            chash[ line[i].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Submission status: Accepted

Solution code:
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0
 
while True:
    line = sys.stdin.readline().rstrip()
    if not line:
        break
    for i in range( len( line ) ):
        if line[i].isalpha():
            chash[ line[i].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Submission status: Accepted

Solution code:
import sys;
Dic={'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:
	lit=sys.stdin.readline().rstrip().lower()
	if not lit: break
	for i in lit:
		if ord('a')<=ord(i)<=ord('z'):
			Dic[i]+=1
Key=Dic.keys()
Key.sort()
for key in Key:
	print key, ":" ,Dic[key]

Submission status: Accepted

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

for c in [chr(i) for i in range(ord('a'), ord('z') + 1)]:
    print(c, ":", s.count(c))

Submission status: Accepted

Solution code:
import sys
from collections import Counter

c = Counter()
for line in sys.stdin.readlines():
    c.update(line.lower())
for a in 'abcdefghijklmnopqrstuvwxyz':
    print a + ' :', c.get(a, 0)

Submission status: Accepted

Solution code:
a = ord('a')
counts = [0] * 26
while 1:
    try:
        raw = input()
    except EOFError:
        break
    for c in raw.lower():
        if 0 <= ord(c) - a < 26:
            counts[ord(c) - a] += 1
for i, count in enumerate(counts):
    print('%s : %d' % (chr(a + i), count))

Submission status: Accepted

Solution code:
import sys

dic = {}
for i in xrange(97, 123):
  dic.setdefault(chr(i), 0)

line = ""
while True:
  try:
    temp = raw_input()
    # print "temp = " + temp
    if temp != "":
      line += temp
    else:
      break
  except:
    break

# print line

for i in xrange(len(line)):
  try:
    if line[i].lower() in dic:
      dic[line[i].lower()] += 1
  except TypeError:
    continue

  # print dic
for i in xrange(97, 123):
  print chr(i) + " : " + str(dic[chr(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:
docs = ''
while True:
    try:
        s = raw_input()
    except:
        break
    docs += s.lower()
for ascii_num in range(97, 123):
    print '%s : %d' % (chr(ascii_num), docs.count(chr(ascii_num)))

Submission status: Accepted

Solution code:

alphabet = [0]*26
i = 0;
for j in range(97,123):
	alphabet[i] = chr(j)
	i += 1
al_count = [0]*26
while True :
	try :
		words = raw_input().lower().split()
		for k in words :
			for l in list(k):
				if l=='a':
					al_count[0] += 1
				elif l=='b':
					al_count[1] += 1
				elif l=='c':
					al_count[2]+=1	
				elif l=='d':
					al_count[3] += 1
				elif l=='e':
					al_count[4]+=1
				elif l=='f':
					al_count[5] += 1
				elif l=='g':
					al_count[6]+=1
				elif l=='h':
					al_count[7] += 1
				elif l=='i':
					al_count[8]+=1
				elif l=='j':
					al_count[9] += 1
				elif l=='k':
					al_count[10]+=1	
				elif l=='l':
					al_count[11] += 1
				elif l=='m':
					al_count[12]+=1	
				elif l=='n':
					al_count[13] += 1
				elif l=='o':
					al_count[14]+=1
				elif l=='p':
					al_count[15] += 1
				elif l=='q':
					al_count[16]+=1
				elif l=='r':
					al_count[17] += 1
				elif l=='s':
					al_count[18]+=1
				elif l=='t':
					al_count[19] += 1
				elif l=='u':
					al_count[20]+=1
				elif l=='v':
					al_count[21]+=1
				elif l=='w':
					al_count[22] += 1
				elif l=='x':
					al_count[23]+=1
				elif l=='y':
					al_count[24] += 1
				elif l=='z':
					al_count[25]+=1
	except :
		break
for i in range(26):
	print '%c : %d' %(alphabet[i],al_count[i])

Submission status: Accepted

Solution code:
import string
import sys

input_str = ""

for i in sys.stdin:
    input_str += i

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:
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))