Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. str = 'Wow Pum Tor'
  2. count = {}
  3. for s in str:
  4.   s = s.lower()
  5.   if count.has_key(s):
  6.     count[s] += 1
  7.   else:
  8.     count[s] = 1
  9.  
  10. for key in count:
  11.   if count[key] >= 1:
  12.     print key, count[key]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement