Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word = input()
- dict_word = {}
- for letter in word:
- if letter in dict_word:
- dict_word[letter] += 1
- else:
- dict_word[letter] = 1
- for key, value in dict_word.items():
- print(f"{key} -> {value}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement