fork download
  1. import csv
  2. import sys
  3.  
  4. it = csv.reader(sys.stdin, quoting=csv.QUOTE_NONNUMERIC)
  5. avg = next(it)
  6. count = 1
  7. for count, row in enumerate(it, start=2):
  8. for i, value in enumerate(row):
  9. avg[i] += value
  10. avg = [a/count for a in avg]
  11. print(avg)
Success #stdin #stdout 0.09s 8920KB
stdin
0,256352728,10070198,5079543,5024472,34764
0,352618127,10102320,4987654,3082111,1902909
0,505838297,9977968,423278,4709666,5041639
0,506598469,10083489,0,5032146,5054715
0,536869414,7229488,39934,4322290,3607046
stdout
[0.0, 431655407.0, 9492692.6, 2106081.8, 4434137.0, 3128214.6]