input: Write a python function to fetch and display titles from a given Stack Exchange API URL.
  assert fetch_titles("https://api.stackexchange.com/2.2/search?order=desc&sort=activity&tags=python&site=stackoverflow") == ["Example Title 1", "Example Title 2"]
  assert fetch_titles("https://api.stackexchange.com/2.2/search?order=desc&sort=activity&tags=java&site=stackoverflow") == ["Example Title 3", "Example Title 4"]
  assert fetch_titles("https://api.stackexchange.com/2.2/search?order=desc&sort=activity&tags=javascript&site=stackoverflow") == ["Example Title 5", "Example Title 6"]
output: import requests
  
  def fetch_titles(url):
      response = requests.get(url)
      data = response.json()
      titles = [item['title'] for item in data['items']]
      return titles