I'm using split
to parse http requests and came across something that I do not like but don't know a better way.
Imagine I have this GET : /url/hi
I'm splitting the url simply like so:
fields = request['url'].split('/')
It's simple, it works but it also makes the contents of the list have the first position as an empty string. I know this is expected behavior.
The question is: Can I change the calling of split to contemplate such thing or do I just live with it?