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
7eec0afc
Commit
7eec0afc
authored
Jul 21, 2021
by
Siu, Pui Chung
Browse files
Add new file
parent
4cb650ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
simple_pig_latin.py
0 → 100644
View file @
7eec0afc
def
pig_it
(
text
):
new
=
" "
text_list
=
text
.
split
(
" "
)
for
i
in
text_list
:
if
i
in
'!.%&?'
:
new
+=
i
else
:
new
+=
i
[
1
:]
+
i
[
0
]
+
"ay"
+
" "
return
new
.
strip
(
" "
)
#remove space
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