muhammad_nasif

TASK_11_CHANGED

Apr 13th, 2021 (edited)
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. input_str = input()
  2. input_str = input_str.lower()
  3. input_str = input_str.replace(" ", "")
  4. dictionary = {}
  5.  
  6.  
  7. for key in input_str:
  8.     if key in dictionary.keys():
  9.         dictionary[key] += 1
  10.     else:
  11.         dictionary[key] = 1
  12.  
  13. print(dictionary)
Add Comment
Please, Sign In to add comment