input: Write a function to filter a list of email addresses and return a list of email addresses that belong to a particular domain. The function should take two arguments: a list of email addresses and a domain (e.g., "@gmail.com"). If the list of email addresses is empty, the function should return an empty list.
  
  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(["alice@hotmail.com", "ben@gmail.com", "claire@hotmail.com"], "@hotmail.com")==["alice@hotmail.com", "claire@hotmail.com"]
  assert filter_emails([], "@yahoo.com")==[]
output: def filter_emails(emails, domain):
      return [email for email in emails if email.endswith(domain)]