Guest User

Untitled

a guest
Aug 23rd, 2019
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pprint
  2. message = 'This is a sentence from which we will count the characters'
  3. count = {}
  4.  
  5. for char in message.upper():
  6. count.setdefault(char, 0)
  7. count[char] += 1
  8. pprint.pprint(count)
RAW Paste Data