input: Write a python function to extract and return the titles from the <h3> elements of a given URL.
  assert extract_titles("https://www.example.com/titles") == ['Title1', 'Title2', 'Title3']
  assert extract_titles("https://www.example.com/empty") == []
  assert extract_titles("https://www.example.com/other-titles") == ['Other Title1', 'Other Title2']
output: def extract_titles(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      titles = [h3.get_text() for h3 in soup.find_all('h3')]
      return titles