Skip to content

Instantly share code, notes, and snippets.

@Angeldude
Last active March 14, 2019 00:35
Show Gist options
  • Save Angeldude/7a697edd73f84c7e51171afe690ae9c3 to your computer and use it in GitHub Desktop.
Save Angeldude/7a697edd73f84c7e51171afe690ae9c3 to your computer and use it in GitHub Desktop.
Made this code work!
# 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