input: Write a function to filter a list of email addresses according to a specified domain. The function should take a list of strings and a domain string as inputs and return a list of email addresses that belong to the specified 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(["alice@hotmail.com", "charlie@hotmail.com"], "@hotmail.com")==["alice@hotmail.com", "charlie@hotmail.com"]
  assert filter_emails(["eve@outlook.com"], "@yahoo.com")==[]
  assert filter_emails([], "@gmail.com")==[]
output: def filter_emails(emails, domain):
      return [email for email in emails if email.endswith(domain)]