input: Write a function to fetch and print all the titles from a given URL using BeautifulSoup.
  assert fetch_titles('https://www.example.com/')==['Example Domain']
  assert fetch_titles('https://www.python.org/')==['Welcome to Python.org']
  assert fetch_titles('https://www.github.com/')==['GitHub: Where the world builds software · GitHub']
output: def fetch_titles(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      titles = [title.get_text() for title in soup.find_all('title')]
      return titles