Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. n=int(input())
  2. word=input()
  3. i=0
  4. dict={}
  5.  
  6. for char in word:
  7.     if char not in dict:
  8.         for charchek in word:
  9.             if char==charchek:
  10.                 i=i+1
  11.         dict[char] = i
  12.         i=0
  13.  
  14.  
  15. for key in sorted(dict):
  16.     print(key,str(dict[key]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement