input: Write a function to parse a given URL and return the protocol, domain name, and path as a tuple. If the input URL is None, return a tuple of three empty strings.
  assert parse_url('https://www.example.com/path/to/file')==('https', 'www.example.com', '/path/to/file')
  assert parse_url('http://test.com/')==('http', 'test.com', '/')
  assert parse_url('ftp://ftp.example.net/directory')==('ftp', 'ftp.example.net', '/directory')
  assert parse_url(None)==('', '', '')
  assert parse_url('https://subdomain.maindomain.org')==('https', 'subdomain.maindomain.org', '/')
output: def parse_url(url):
      if url is None:
          return ('', '', '')
      parts = url.split('://')
      protocol = parts[0]
      domain_and_path = parts[1].split('/', 1)
      domain = domain_and_path[0]
      path = '/' + domain_and_path[1] if len(domain_and_path) > 1 else '/'
      return (protocol, domain, path)