Editor settings

General settings

Save settings

Learn to program with Python

Make a kebab #

Write a function that takes a sentence as input and converts it into kebab case. Kebab case is a naming convention where spaces are replaced with hyphens "-", all letters are lowercase, and only alphabets and numbers are kept, while symbols are stripped off.


Tests #

  • make_kebab("Hello World") should return "hello-world"
  • make_kebab("Python Programming Language") should return "python-programming-language"
  • make_kebab("This Is a Sentence!") should return "this-is-a-sentence"
  • make_kebab("Coding Is Fun!!!") should return "coding-is-fun"
  • make_kebab("I Love Python*&^%") should return "i-love-python"
Output will be displayed here