Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Enter your code here. Read input from STDIN. Print output to STDOUT
- string = "% percent of the lowest 1 2 3, for five 9??? WHat the FUCK!"
- string = string.lower().split(' ')
- seen = {}
- for i in string:
- temp = ''.join(list(filter(lambda x: x.isalpha(), i)))
- if temp:
- if temp in seen:
- seen[temp] += 1
- else:
- seen[temp] = 1
- for i in sorted(seen.items()):
- if not i:
- None
- else:
- print("{0} - {1}; ".format(i[0], i[1] ), end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement