Last active
March 14, 2019 00:35
-
-
Save Angeldude/7a697edd73f84c7e51171afe690ae9c3 to your computer and use it in GitHub Desktop.
Made this code work!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment