input: Write a function to search for all occurrences of a query in a given list and return their indices. The function should take a list and a search query as input and return a list of indices where the query is found in the list. If the query is not found, the function should return an empty list.
  assert search_list(["apple", "banana", "peach", "orange", "grape"], "apple") == [0]
  assert search_list(["apple", "banana", "peach", "orange", "grape"], "banana") == [1]
  assert search_list(["apple", "banana", "peach", "orange", "grape"], "orange") == [3]
  assert search_list(["apple", "banana", "peach", "orange", "grape"], "grape") == [4]
  assert search_list(["apple", "banana", "peach", "orange", "grape"], "mango") == []
  assert search_list([], "apple") == []
output: def search_list(lst, query):
      return [i for i, item in enumerate(lst) if item == query]