You can download this code by clicking the button below.
This code is now available for download.
Capitalize the first letter of each word in the input sentence.
Technology Stack : str.split(), str.capitalize()
Code Type : String processing
Code Difficulty : Intermediate
def capitalize_first_letter_of_each_word(sentence):
return ' '.join(word.capitalize() for word in sentence.split())