我已经为以下程序完成了硬代码,但我无法从每列中找到它的平均值和最大值。
输出应如下所示:
2.42 11.42 13.86 72.32
56.59 88.52 4.33 87.70
73.72 50.50 7.97 84.47
============================
73.72 88.52 13.86 87.70 column max
44.24 50.15 8.72 81.50 column average
我有一些这样做的
list1=[2.42, 11.42,13.86,72.32]
list2=[56.59,88.52,4.33,87.70]
list3=[73.72,50.50,7.97,84.47]
data=[]
print list1
print list2
print list3
print "=========================="
输出
================================
[2.42, 11.42, 13.86, 72.32]
[56.59, 88.52, 4.33, 87.7]
[73.72, 50.5, 7.97, 84.47]
==========================