Quantcast
Channel: Finding the average of a list - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Answer by Taylan for Finding the average of a list

$
0
0

I want to add just another approach

import itertools,operatorlist(itertools.accumulate(l,operator.add)).pop(-1) / len(l)

Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>