Advertisement
here2share

# url_split.py

May 11th, 2025
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. # url_split.py
  2.  
  3. url = "https://www.example.com/docs/ui/rich-text"
  4.  
  5. idx = url.index('/', 10)
  6. website, link = url[:idx], '/' + url[idx+1:]
  7.  
  8. print(website)
  9. print(link)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement