In this Python list program, we will take a user input as a list and calculate the average of the list with the help of the below-given steps.
Average of the list elements:
Steps to solve the program
- Take a list as input.
- Create a variable called total.
- Add each element of the list in the total variable using for loop.
- To find the average divide the total by length of the list.
- Print the output to see the result.
output :
Related Articles
Python program to count integers in a given mixed list.
Python program to access multiple elements of the specified index from a given list.
Python program to check whether a specified list is sorted or not.
Python program to remove duplicate dictionaries from a given list.
Python program to check if the elements of a given list are unique or not.
Python program to remove duplicate sublists from the list.