URL Normalizer

Implement the function normalize(url: str) -> str, which receives a URL and returns its normalized form. Simplification rules include a default protocol of http and a default domain of localhost...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: