import scipy.stats
import numpy as np

x = [8.0, 1, 2.5, 4.0, 2.0]
##################### using pure python ###############
n = len(x)
mean_ = sum(x) / n
var_ = sum((item - mean_)**2 for item in x) / (n - 1)
std_ = var_ ** 0.5
skew_ = (sum((item - mean_)**3 for item in x)* n / ((n - 1) * (n - 2) * std_**3))
print("skewness using  pure python: ",skew_)

######################### using scipy.stats.skew() ###############
y = np.array(x)
print("skewness using  scipy.stats.skew(): ", scipy.stats.skew(y, bias=False))