Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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))
Source by www.guru99.com #
 
PREVIOUS NEXT
Tagged: #python #average #list
ADD COMMENT
Topic
Name
8+3 =