Expedia Group Interview Question

Codice challenge (Python): Write a program that, given a URL, parses out and displays its constituent components. For the purpose of this challenge, a url is in the form <protocol>://<domain>/path?<query_string>. Print out the protocol, domain and query_string, separated by commas.