There are multiple ways to find the average of the list in Python.

Table of Contents

## Using sum() and len()

We can use `sum()`

to find sum of list and then divide it with `len()`

to find average of list in Python.

Here is the quick example of the same.

**💻 Awesome Tech Resources:**

- Looking for ⚒️ tech jobs? Go to our job portal.
- Looking for tech events? Go to tech events 🗓️ Calendar.️

1 2 3 4 5 6 7 8 |
def average(listOfIntegers): return sum(listOfIntegers)/len(listOfIntegers) listOfIntegers = [3,2,4,1,5] averge = average(listOfIntegers) print("Average of listOfIntegers:",averge) |

**Output:**

## Using reduce(), lambda and len()

We can use `reduce()`

and `lambda`

to find sum of list and then divide it with `len()`

of list.

1 2 3 4 5 6 7 8 9 10 |
from functools import reduce def average(listOfIntegers): return reduce(lambda x,y: x+y,listOfIntegers)/len(listOfIntegers) listOfIntegers = [3,2,4,1,5] averge = average(listOfIntegers) print("Average of listOfIntegers:",averge) |

**Output:**

## Using mean()

We can also directly use inbuilt function mean() from statistics module.

1 2 3 4 5 6 7 8 9 10 |
from statistics import mean def average(listOfIntegers): return mean(listOfIntegers) listOfIntegers = [3,2,4,1,5] averge = average(listOfIntegers) print("Average of listOfIntegers:",averge) |

**Output:**

That’s all about find average of list in Python.