I decided that I'll learn Python tonight :) I know C pretty well (wrote an OS in it), so I'm not a noob in programming, so everything in Python seems pretty easy, but I don't know how to solve this problem: let's say I have this address:
http://example.com/random/folder/path.html
Now how can I create two strings from this, one containing the "base" name of the server, so in this example it would be
and another containing the thing without the last filename, so in this example it would be
http://example.com/random/folder/
Also I of course know the possibility to just find the third and last slash respectively, but is there a better way?
Also it would be cool to have the trailing slash in both cases, but I don't care since it can be added easily. So is there a good, fast, effective solution for this? Or is there only "my" solution, finding the slashes?