{"id":3333,"date":"2021-04-22T17:10:32","date_gmt":"2021-04-22T11:40:32","guid":{"rendered":"https:\/\/python-programs.com\/?p=3333"},"modified":"2021-11-22T18:44:55","modified_gmt":"2021-11-22T13:14:55","slug":"python-capitalize-the-first-letter-of-each-word-in-a-string","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-capitalize-the-first-letter-of-each-word-in-a-string\/","title":{"rendered":"Python: Capitalize the First Letter of Each Word in a String?"},"content":{"rendered":"

A sequence of characters is referred to as a string.<\/p>\n

Characters are not used by computers instead, numbers are used (binary). Characters appear on your computer, but they are internally stored and manipulated as a sequence of 0s and 1s.<\/p>\n

In Python, a string is a set of Unicode characters. Unicode was designed to include every character in every language and to introduce encoding uniformity to the world. Python Unicode will tell you all about Unicode you need to know.<\/p>\n

Example:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

string = \"this is btech geeks\"<\/pre>\n

Output:<\/strong><\/p>\n

This Is Btech Geeks<\/pre>\n

Given a string, the task is to convert each word first letter to uppercase<\/p>\n

Capitalize the First Letter of Each Word in a String<\/h2>\n

There are several ways to capitalize the first letter of each word in a string some of them are:<\/p>\n