pyassistant

Sum of Integers at Even Indices

Given a list of integers, write a function to return the sum of all the elements at even indices in the list.

Example:

Input:
[3, 5, 2, 8, 10, 4, 7]
Output:
12

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.