Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Siu, Pui Chung
codewar solutions
Commits
804c935b
Commit
804c935b
authored
Jul 21, 2021
by
Siu, Pui Chung
Browse files
Add new file
parent
5da5572e
Changes
1
Hide whitespace changes
Inline
Side-by-side
replace_with_alphabet_position
0 → 100644
View file @
804c935b
def alphabet_position(text):
#filter through all non-alphabet characters
alphabets_low = "".join([chr for chr in text.lower() if chr.isalpha()])
alphabet_position = " ".join([str(ord(alp) - 96) for alp in alphabets_low])
return alphabet_position
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment