input: Write a function to filter a list of email addresses and return a new list containing only those emails that belong to a specified domain. If the input list is empty, return an empty list.
  def filter_emails(email_list, domain):
      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"], "@gmail.com") == ["john@gmail.com", "sophie@gmail.com"]
  assert filter_emails(["jon@outlook.com", "emma@outlook.com"], "@outlook.com") == ["jon@outlook.com", "emma@outlook.com"]
  assert filter_emails([], "@gmail.com") == []
  assert filter_emails(["alice@yahoo.com", "ben@yahoo.com"], "@gmail.com") == []
output: def filter_emails(email_list, domain):
      return [email for email in email_list if email.endswith(domain)]