There are lots of ways to do this. You could use
re.split() to split on a regular expression, for instance.
>>> import re >>> re.split(r'\b/\b', 'https://example.com/about/hello/') ['https://example.com', 'about', 'hello']
re is part of the standard library, documented here.
The regex itself uses
\b which means a boundy between a "word" character and a "non-word" character. You can use regex101 to explore how it works. https://regex101.com/r/mY8fV8/1