input: Write a python function to extract data from a table in an HTML page using BeautifulSoup.
  assert extract_table_data('http://example.com/table.html')==[['Name', 'Email'], ['John Doe', 'john@example.com']]
  assert extract_table_data('http://example.com/another_table.html')==[['Header1', 'Header2'], ['Row1Col1', 'Row1Col2'], ['Row2Col1', 'Row2Col2']]
output: def extract_table_data(url):
      import requests
      from bs4 import BeautifulSoup
      
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      
      table = soup.find('table')
      data = []
      
      for row in table.find_all('tr'):
          cols = row.find_all(['td', 'th'])
          cols = [ele.text.strip() for ele in cols]
          data.append(cols)
      
      return data