call the function urlunsplit with an argument tuple with 4 elements: scheme, netloc, path, query and fragment, substitute the result for url.
url = urlunsplit ( ( scheme , netloc , path , query , fragment ) )