Return elements at even indices. Example: [10,20,30,40,50] => [10,30,50]
Implement this function:
def alternating(lst: list) -> list:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst.
Input
[10, 20, 30, 40, 50]
Output
[10, 30, 50]