Count frequency (A to J)



Problem to find the each A to J character count.It has only uppercase character in the given string.



Example-1:


Input    : s = "AAABBEEDC"
Output   : [3, 2, 1, 1, 2, 0, 0, 0, 0, 0]   
Explain  : 'A' count is 3, 'B' count is 2, 'C' count is 1, 'D' count is 1, 
           'E' count is 2, 'F' count is 0, 'G' count is 0, 'H' count is 0,
           'I' count is 0, 'J' count is 0. 


Example-2:


Input    : s = "CODE"
Output   : [0, 0, 1, 1, 1, 0, 0, 0, 0, 0] 







Solution




s = "AAABBEEDC"

l = []

for i in range(65,75):

    a = chr(i)

    b = s.count(a)

    l.append(b)
    
print(l)



Output



[3, 2, 1, 1, 2, 0, 0, 0, 0, 0]