input: Write a python function to fetch a webpage, parse a table from it using BeautifulSoup, and save the data to a CSV file.
  assert fetch_and_save_table("https://www.example.com", "example.csv") == True
output: def fetch_and_save_table(url, csv_filename):
      import requests
      from bs4 import BeautifulSoup
      import csv
      
      # Fetch the webpage content
      response = requests.get(url)
      if response.status_code != 200:
          return False
      
      # Parse the webpage content
      soup = BeautifulSoup(response.content, 'html.parser')
      
      # Find the table
      table = soup.find('table')
      if not table:
          return False
      
      # Extract table headers
      headers = [header.text.strip() for header in table.find_all('th')]
      
      # Extract table rows
      rows = []
      for row in table.find_all('tr')[1:]:  # Skip the header row
          cols = [col.text.strip() for col in row.find_all('td')]
          rows.append(cols)
      
      # Write the data to a CSV file
      with open(csv_filename, 'w', newline='') as csvfile:
          csvwriter = csv.writer(csvfile)
          csvwriter.writerow(headers)
          csvwriter.writerows(rows)
      
      return True