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
e9c1727a
Commit
e9c1727a
authored
Jul 21, 2021
by
Siu, Pui Chung
Browse files
Add new file
parent
b9c1ffc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
move_zeros_to_the_end
0 → 100644
View file @
e9c1727a
def move_zeros(array):
zeros = []
list = []
for chr in array:
if chr == 0 or 0.0:
if type(chr) == float or type(chr) == int:
zeros.append(chr)
else:
list.append(chr)
else:
list.append(chr)
return list + zeros
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