Answers for "how to take the average of a slice of a list python"

0

python get average of list

#python3

def average(list): 
    result = sum(list) / len(list) 
    return result 

list = [68,68,71,71,71,75,71,78,91,98,75,71,84]
print(average(list))
Posted by: Guest on March-05-2021

Code answers related to "how to take the average of a slice of a list python"

Python Answers by Framework

Browse Popular Code Answers by Language