input: Write a function to filter a list of email addresses and return only those that belong to a specified domain. The function should take two parameters: the list of email addresses and the domain to filter by. If the domain is not provided, it should default to "@gmail.com".
  def filter_emails(email_list, domain="@gmail.com"):
      return [email for email in email_list if email.endswith(domain)]
  
  assert filter_emails(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"])==["john@gmail.com", "sophie@gmail.com"]
  assert filter_emails(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@yahoo.com")==["sarah@yahoo.com"]
  assert filter_emails([])==[]
  assert filter_emails(["bob@microsoft.com"], "@microsoft.com")==["bob@microsoft.com"]
  assert filter_emails(["alice@outlook.com"], "@gmail.com")==[]
output: def filter_emails(email_list, domain="@gmail.com"):
      return [email for email in email_list if email.endswith(domain)]