aboutsummaryrefslogtreecommitdiff
path: root/challenge-197/eric-cheung/python/ch-1.py
blob: b84bff5774bfef3b92c86d4d53a28aeb2c089486 (plain)
1
2
3
4
5
6
7
8
9
10
import numpy as np

## arrInputList = np.array([1, 0, 3, 0, 0, 5])  ## Example 1
## arrInputList = np.array([1, 6, 4])  ## Example 2
arrInputList = np.array([0, 1, 0, 2, 0])  ## Example 3

arrOutputList = np.append(arrInputList[arrInputList != 0], arrInputList[arrInputList == 0])

print (arrOutputList)