input: Write a python function to extract titles and links from a webpage using BeautifulSoup.
  assert extract_titles_and_links('https://www.example.com') == (['Example Domain'], ['http://www.iana.org/domains/example'])
  assert extract_titles_and_links('https://www.python.org') == (['Welcome to Python.org', 'Downloads', 'Documentation'], ['https://www.python.org/', 'https://www.python.org/downloads/', 'https://docs.python.org/3/'])
  assert extract_titles_and_links('https://www.wikipedia.org') == (['Wikipedia'], ['https://www.wikipedia.org/'])
output: def extract_titles_and_links(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')]
      links = [link.get('href') for link in soup.find_all('a') if link.get('href')]
  
      return (titles, links)