Created
November 12, 2017 04:56
-
-
Save imfht/ae6dcb0dbfe6f2d6eaaec4bc1739e36d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import urlparse | |
>>> url = 'http://stackoverflow.com/questions/1234567/blah-blah-blah-blah' | |
>>> urlparse.urljoin(url, '/') | |
'http://stackoverflow.com/' | |
# source: https://stackoverflow.com/a/32214840/8591480 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment