赞
踩
import numpy as np list_test = [0.21, 0.32] print(f'{np.mean(list_test):.2f}') #保留两位小数print(f'{np.mean(list_test):.3f}') #保留三位小数