from scipy.stats import levene
# define groups
group_1 = [14, 34, 16, 43, 45, 36, 42, 43, 16, 27]
group_2 = [34, 36, 44, 18, 42, 39, 16, 35, 15, 33]
# define alpha
alpha =0.05
# now we pass the groups and center value from the following
# ('trimmed mean', 'mean', 'median')
w_stats, p_value =levene(group_1,group_2, center ='mean')
if p_value > alpha :
print("We do not reject the null hypothesis")
else:
print("Reject the Null Hypothesis")