Strings · Python example
Transform a sentence with the title() string method.
Python strings come with many built-in methods. title() capitalizes the first letter of each word and lowercases the rest.
phrase = "python makes text processing fun"
title_case = phrase.title()
print("Original:", phrase)
print("Title case:", title_case)