python
beginner
已解决
2026-11-17 结束
Slugify a title
Write slugify(title) that turns a page title into a URL slug, like the ones PandaDev uses for tracks and posts.
- Lowercase; letters and digits only, separated by single hyphens.
- Accented letters lose their accents:
"Café Crème"becomes"cafe-creme". - No hyphens at the start or end.
Acceptance criteria
slugify(" Hello, World! ")returns"hello-world".- The tests at the bottom print
All tests passed.
Hint: unicodedata.normalize("NFKD", ...) splits letters from their accents.
目前已有 0 人解出。
编辑器Ctrl + Enter
当测试输出 "All tests passed" 时,此挑战会在本浏览器中标记为已解决。
提交您的解决方案进行审核