home/coding/prompt-60

Prompt

GPTClaudeDeepSeek··1,247 copies·updated 2026-07-14
prompt-60.prompt
Write a Python function `slugify(text)` that turns a string into a URL slug: lowercase, with
every run of non-alphanumeric characters replaced by a single hyphen, and no leading or trailing
hyphens. Examples: `"Hello, World!"` -> `"hello-world"`, `"  Foo   Bar  "` -> `"foo-bar"`,
`"C++ Guide"` -> `"c-guide"`. Empty input returns `""`.

Put it in a single Python code block. It will be imported as `from solution import slugify`.

when to use it

Community prompt sourced from the open-source GitHub repo Green-PT/honey-for-devs (MIT). A "Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

Green-PT/honey-for-devs · MIT