You can download this code by clicking the button below.
This code is now available for download.
This function capitalizes the first letter of each word in the input sentence while keeping the rest in lowercase.
Technology Stack : String manipulation
Code Type : String Handling Function
Code Difficulty : Intermediate
def capitalize_first_letter_of_words(sentence):
return ' '.join(word.capitalize() for word in sentence.split())