input: 
  def filter_by_domain(email_list: List[str], domain: str) -> List[str]:
      """Given a list of email addresses and a domain, return a filtered list of email addresses
      belonging to the specified domain.
  
      >>> filter_by_domain(["john@gmail.com", "sarah@yahoo.com", "bob@microsoft.com", "sophie@gmail.com"], "@gmail.com")
      ["john@gmail.com", "sophie@gmail.com"]
      """
  
output:     filtered_list = []
      for email in email_list:
          if email.endswith(domain):
              filtered_list.append(email)
      return filtered_list