Advertisement
muhammad_nasif

TASK_11

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