display the average of elements of the list slice that contains every 3rd element of the list.(python)
please help me to solve this
Answers
Answered by
0
Answer:
Explanation:
Assuming that the list is called lst, the following code may be used:-
third_index = lst[::3]
average = sum(third_index) / len(third_index)
print(average)
Similar questions