input: Write a python function to scrape product titles and prices from a webpage.
  assert scrape_products('https://www.example.com/') == [{'title': 'Product 1', 'price': '$10'}, {'title': 'Product 2', 'price': '$20'}]
  assert scrape_products('https://www.example.com/empty') == []
  assert scrape_products('https://www.example.com/single') == [{'title': 'Single Product', 'price': '$5'}]
output: def scrape_products(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      products = []
      for product in soup.select('.product'):  # Assuming the products have a class 'product'
          title = product.select_one('.title').get_text(strip=True)  # Assuming the title has a class 'title'
          price = product.select_one('.price').get_text(strip=True)  # Assuming the price has a class 'price'
          products.append({'title': title, 'price': price})
  
      return products