input: Write a function to parse the given URL and print out the protocol, domain name, and path using Python.
  assert parse_url('https://www.example.com/path/to/file')=={'Protocol': 'https', 'Domain name': 'www.example.com', 'Path': '/path/to/file'}
  assert parse_url('http://sub.domain.co.uk/another/path/')=={'Protocol': 'http', 'Domain name': 'sub.domain.co.uk', 'Path': '/another/path/'}
  assert parse_url('ftp://server.net/some/directory')=={'Protocol': 'ftp', 'Domain name': 'server.net', 'Path': '/some/directory'}
  assert parse_url('https://www.example.com')=={'Protocol': 'https', 'Domain name': 'www.example.com', 'Path': '/'}
  assert parse_url('http://localhost:8080/index.html')=={'Protocol': 'http', 'Domain name': 'localhost:8080', 'Path': '/index.html'}
output: def parse_url(url):
      protocol_end = url.find('://')
      protocol = url[:protocol_end]
      url = url[protocol_end+3:]
      domain_end = url.find('/')
      if domain_end == -1:
          domain = url
          path = '/'
      else:
          domain = url[:domain_end]
          path = url[domain_end:]
      return {'Protocol': protocol, 'Domain name': domain, 'Path': path}