input: Write a python function to scrape search results from a specified URL using BeautifulSoup and print the results.
  assert isinstance(search_data("machine learning"), None)
  assert isinstance(search_data("artificial intelligence"), None)
  assert isinstance(search_data("data science"), None)
output: def search_data(query):
      import requests
      from bs4 import BeautifulSoup
  
      # Replace with the actual search URL
      search_url = f"https://www.example.com/search?q={query}"
      
      # Send a request to the search URL
      response = requests.get(search_url)
      
      # Parse the content with BeautifulSoup
      soup = BeautifulSoup(response.content, 'html.parser')
      
      # Assuming search results are contained within elements with class 'result'
      results = soup.find_all(class_='result')
      
      # Print each result
      for result in results:
          print(result.text)