Skip to content
Advertisement

How to build URLs in Python with the standard library? [closed]

I need to know how to build URLs in python like:

JavaScript

In the python standard library, how would you build a URL?

Advertisement

Answer

urlparse in the python standard library is all about building valid urls. Check the documentation of urlparse

Example:

JavaScript

Output:

JavaScript
Advertisement