Mean of Tuple List - Python Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report We are give list of tuples we need to find the mean of each tuples. For example, a = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] we need to find mean of each tuples so that output should be (4.0, 5.0, 6.0).Using sum() and len()We can find the mean of a tuple list by summing corresponding elements using sum() and dividing by the number of tuples using len(). This is done element-wise to compute the mean for each position in the tuples. Python a = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] # Compute mean of each tuple position m = tuple(sum(col) / len(col) for col in zip(*a)) print(m) Output(4.0, 5.0, 6.0) Explanation:zip(*a) groups corresponding elements from all tuples, and sum(col) / len(col) calculates the mean for each position.Result is stored as a tuple ensuring the mean values maintain the same structure as the original tuples.Using numpyWe can use NumPy to compute the mean of a tuple list efficiently by converting it into an array and applying numpy.mean() along desired axis. This returns a tuple with mean of each position in original tuples. Python import numpy as np # Compute mean using numpy a = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] m = tuple(map(float, np.mean(a, axis=0))) print(m) Output(4.0, 5.0, 6.0) Explanation:np.mean(a, axis=0) computes the mean of each corresponding element in tuples by treating a as a NumPy array and averaging along columns.tuple(map(float, ...)) converts NumPy array of means into a tuple of floats for consistent output formatting.Using statistics.mean()statistics.mean() function can be used to compute mean of each position in a tuple list by applying it to corresponding elements grouped using zip(). This ensures an element-wise mean calculation returning a tuple of mean values. Python from statistics import mean # Compute mean using statistics.mean() a = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] m = tuple(map(mean, zip(*a))) print(m) Output(4, 5, 6) Explanation:zip(*a) groups corresponding elements from all tuples creating separate iterables for each position.map(mean, zip(*a)) applies statistics.mean() to each group computing mean for each position and returning a tuple of mean values. Comment More infoAdvertise with us Next Article Python | Addition of tuples M manjeet_04 Follow Improve Article Tags : Python Python Programs Python list-programs Practice Tags : python Similar Reads Python - Kth Index Tuple List Mean Sometimes, while working with Python tuple, we can have a problem in which we need to compute average of any particular index of tuples in a list. This kind of problem can have application in data domain such as web development. Let's discuss certain ways in which this task can be performed. Input : 5 min read Python | Column Mean in tuple list Sometimes, while working with records, we can have a problem in which we need to average all the columns of a container of lists which are tuples. This kind of application is common in web development domain. Letâs discuss certain ways in which this task can be performed. Method #1 : Using sum() + l 4 min read Python | Addition of tuples In Python, tuples are immutable sequences used to store multiple items. Adding tuples refers to concatenating two or more tuples to form a new one. Since tuples cannot be modified, original tuples remain unchanged and the result is a new tuple containing all the elements in order.Example:Pythont1 = 3 min read Python | Addition of tuples In Python, tuples are immutable sequences used to store multiple items. Adding tuples refers to concatenating two or more tuples to form a new one. Since tuples cannot be modified, original tuples remain unchanged and the result is a new tuple containing all the elements in order.Example:Pythont1 = 3 min read Python - Sum of tuple elements Sometimes, while programming, we have a problem in which we might need to perform summation among tuple elements. This is an essential utility as we come across summation operations many times and tuples are immutable and hence required to be dealt with. Letâs discuss certain ways in which this task 6 min read Python Tuple - len() Method While working with tuples many times we need to find the length of the tuple, and, instead of counting the number of elements with loops, we can also use Python len(). We will learn about the len() method used for tuples in Python. Example: Python3 Tuple =( 1, 0, 4, 2, 5, 6, 7, 5) print(len(Tuple)) 2 min read Like