Učitavanje zadatka…
In URLs, the part after # usually points to a specific place on a page, but sometimes you only need the main address for saving or comparison. Write a function remove_url_anchor that takes a string url and removes the anchor from it. Remove the # character itself and everything after it.
"www.codewars.com#about""www.codewars.com""www.codewars.com?page=1""www.codewars.com?page=1""www.example.com#""www.example.com"def remove_url_anchor(url: str) -> str:
Prijavi se da vidiš povijest predaja
PrijavaPrijavi se da koristiš AI mentora
PrijavaThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.