One of the essential features of any programming language is the ability to manipulate strings. In this article, we’ll explore a simple yet powerful Python string method called title()
. We will see how to use this method to capitalize the first letter of each word in a given string.
The title()
method is a built-in Python string method that capitalizes the first letter of each word in a given string. It returns a new string where the first letter of each word is capitalized, and all other letters are in lowercase. Here is the syntax of the title()
method:
string.title()
Continue reading