Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text = str(input('Enter text: '))
- my_dict = {}
- for c in text:
- my_dict[c] = text.count(c)
- print(my_dict)
- # counts elements in input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement