← 返回 apple 的题目列表Extract Elements at Odd Indices from Array
类型:online_judge
apple
Given an array, output a subset of its elements in an alternating order. Specifically, output the first, third, fifth (and so on) elements of the array.
Input: A list of strings, e.g., [a, b, c, d, e]
Output: A sublist in alternating order, e.g., [a, c, e]
Example
Input
['a', 'b', 'c', 'd', 'e']