input: Write a function to filter a list of email addresses based on a specified domain and return the filtered list. If the specified domain is "@gmail.com", only email addresses ending with "@gmail.com" will be included in the returned list. If the input list is empty or no emails match the domain, an empty list will be returned.
  def filter_emails_by_domain(email_list, domain):
      return [email for email in email_list if email.endswith(domain)]
  
  assert filter_emails_by_domain(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@gmail.com") == ["john@gmail.com", "sophie@gmail.com"]
  assert filter_emails_by_domain(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@yahoo.com") == ["sarah@yahoo.com"]
  assert filter_emails_by_domain([], "@gmail.com") == []
  assert filter_emails_by_domain(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@hotmail.com") == []
output: def filter_emails_by_domain(email_list, domain):
      return [email for email in email_list if email.endswith(domain)]