# Find average of list in Python

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

## 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.

Output:

Average of listOfIntegers: 3.0

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

We can use `reduce()` and `lambda` to find sum of list and then divide it with `len()` of list.

Output:

Average of listOfIntegers: 3.0

## Using mean()

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

Output:

Average of listOfIntegers: 3

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

## Related Posts

• 31 May

### Sort list alphabetically in Python

Table of ContentsUse of the sort() function to sort list alphabetically in Python.Use of the sorted() function sort list alphabetically in Python.Use of the QuickSort algorithm sort list alphabetically in Python. 💡 Outline You can use sort() method of list to sort list alphabetically in Python [crayon-61025119b8d13313025482/] In this tutorial, we will discuss different ways […]

• 25 May

### Find common elements in two lists in python

Table of ContentsUsing the intersection() FunctionUsing List ComprehensionUsing & Operator 💡 Outline You can first convert first list into set using set() and call intersection() by passing second list as parameter to find common element in two lists in Python. [crayon-61025119b8ffd884699648/] In this tutorial, we will see different methods to find common elements in two […]

• 11 April

### Python Remove Newline from List

Table of ContentsIntroduction✨ Method 1: Using the replace() method✨ Method 2: Using re.sub()✨ Method 3: Using strip()✨ Method 4: Slice the List Elements✨ Method 5: Using List Comprehension and Splitlines Function✨ Method 6: Using str.maketrans(x,y) and str.translate(map)Conclusion 🎯 Objective: In this article, we will discuss the methods to remove ‘\n’ or newline characters from a […]

• 06 April

### Print Matrix in Python

In this article you will learn "How to print a matrix in Python?"

• 27 February

### [Solved] TypeError: List Indices Must Be Integers Or Slices, Not ‘Str’?

Learn how to fix TypeError: List Indices Must Be Integers Or Slices, Not 'Str' in this article.

• 21 December

### Matrix multiplication in Python using user input

Learn about how to Matrix multiplication in Python using user input.

## Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.