Return all indices of a target value in a list. Example: [1,2,3,2,1], target=2 => [1,3]
Implement this function:
def all_indices(lst: list, target) -> 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, target.
Input
[1, 2, 3, 2, 1]
2
Output
[1, 3]