Click here to Skip to main content
15,891,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
def arithmetic_mean(first, *values):
""" This function calculates the arithmetic mean of a non-empty
arbitrary number of numerical values """

return (first + sum(values)) / (1 + len(values))

x= [('a', 232), ('b', 343), ('c', 543), ('d', 23)]
y= [[('a', 232), ('b', 343), ('c', 543), ('d', 23)]]

What I have tried:

can it be possible by zip method or any other way possible?
Posted
Updated 11-Oct-18 23:03pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900