About 166,000 results
Open links in new tab
  1. python - Finding the average of a list - Stack Overflow

    Dec 8, 2023 · How do I find the arithmetic mean of a list in Python? For example: [1, 2, 3, 4] 2.5

  2. averaging list of lists python column-wise - Stack Overflow

    Jul 23, 2020 · [240, 249, 239, 234], [239, 237, 237, 233]] By performing sum() on each of those slices, you effectively get the column-wise sum. Simply divide by the length of the column to …

  3. python - Find min, max, and average of a list - Stack Overflow

    I am having hard time to figure out how to find min from a list for example somelist = [1,12,2,53,23,6,17] how can I find min and max of this list with defining (def) a function I do not …

  4. python - Find a value in a list - Stack Overflow

    In haskell there is find function in Data.List module that doing exactly that. But in python it's not and it's to small to make it a library so you have to reimplement the same logic over and over …

  5. python - Fastest way to compute average of a list - Stack Overflow

    May 7, 2025 · I want to find the fastest way to compute the average of python lists. I have millions of lists stored in a dictionary, so I am looking for the most efficient way in terms for …

  6. Python: fast way to compute the average of several (same length) …

    This sums up all sublists and then divides the result by the number of sublists, producing the average. You could inline the len computation and turn divide into a lambda like lambda x: x / …

  7. python - Standard deviation of a list - Stack Overflow

    In Python 2.7.1, you may calculate standard deviation using numpy.std() for: Population std: Just use numpy.std() with no additional arguments besides to your data list.

  8. Take a list of numbers and return the average - Stack Overflow

    You then divide by the length of the list (or the number of elements in the list) to find the average. I would recommend googling a python reference to find out how to use common programming …

  9. Finding average length of items in a list. Python - Stack Overflow

    First, iterating over a list in python only copies the value of each item into a temporary variable. So in fact, in your example, k is assigned a value of each item in the list, but changing it doesn't …

  10. python - Get average value from list of dictionary - Stack Overflow

    Mar 1, 2014 · Huh, why looping several times over the same list? Wouldn't it be better to loop over the list elems and then sum up the dict elements in the inner on a reference to the i'th list …

Refresh