input: Write a python function to check if one domain is a subdomain of another.
  assert is_subdomain("example.com", "com") == True
  assert is_subdomain("test.example.com", "example.com") == True
  assert is_subdomain("example.com", "test.example.com") == False
output: def is_subdomain(sub, main):
      return sub == main or sub.endswith("." + main)