Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text_input = input()
- chars = {}
- for char in text_input:
- if ord(char) != 32:
- if char not in chars:
- chars[char] = 1
- else:
- chars[char] += 1
- [print(f'{x} -> {y}') for (x, y) in chars.items()]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement