LearnPy Hub
← Lists problems
Hard

Zeros to the End

Read a list of integers and move all zeros to the end, keeping the order of the other numbers.

Input

One line of integers.

Output

One line.

Sample 1

Input
0 1 0 3 12
Output
1 3 12 0 0

Sample 2

Input
0 0 1
Output
1 0 0
solution.py
Output appears here
Zeros to the End · Python practice problem · LearnPy Hub