import numpy as np
data_list = [1,2,3,4,5,5,4,3,2,1,1,2,3,4,5,5,4,3,2,1,10000,-10000]
data_array = np.asarray(data_list)
mean = np.mean(data_array , axis=0)
std = np.std(data_array , axis=0)
preprocessed_data_array = [x for x in data_array if (x > mean - 3 * std)]
preprocessed_data_array = [x for x in preprocessed_data_array if (x < mean + 3 * std)]
print(preprocessed_data_array )