Strings · Beginner · 35 XP · about 3 min
Write a function called capitalize_words(s) that capitalizes the first letter of each word in a string.
capitalize_words("hello world") # Returns "Hello World" capitalize_words("python is fun") # Returns "Python Is Fun" capitalize_words("THE QUICK BROWN") # Returns "The Quick Brown"
Ready?
Accept the challenge to start writing. A small timer counts the time this page is in view.
Output appears here.