input: Write a python function to search for an item in a list of dictionaries based on a specified key-value pair.
  assert search(data, "city", "New York") == {"name":"John", "age":30, "city":"New York"}
  assert search(data, "age", 25) == {"name":"Mike", "age":25, "city":"Boston"}
  assert search(data, "name", "Frank") == {"name":"Frank", "age":35, "city":"Los Angeles"}
output: def search(data, key, value):
      for item in data:
          if item.get(key) == value:
              return item