Editor settings

General settings

Save settings

Learn to program with Python

Convert the first letter in each word uppercase #

There is another useful function to make the first letter of each word uppercase, and that is title().

Here's an example:

my_string = "PYTHON IS THE EASIEST LANGUAGE TO LEARN."
lowercase_string = my_string.title()
print(lowercase_string) # Output: Python Is The Easiest Language To Learn.

Exercise #

  • Use the title() function to make new_title a title format
  • Do not change the first line of code
Output will be displayed here