Python Program to Capitalize the First Letter of Each Word in Python Using title() Function
# Capitalize the First Letter of Each Word in Python Using title()
country=['india','america','england', 'germany']
print('Original List:')
print(country)
country = [i.title() for i in country]
print('List after capitalizing each word:')
print(country)
Output:
Original List:
['india', 'america', 'england', 'germany']
List after capitalizing each word:
['India', 'America', 'England', 'Germany']
About The Author
I have more than 6 years of experience in the IT industry, and I have built a solid foundation in the creation and upkeep of online applications. I have constantly shown strong work ethics, self-motivation, and an aptitude for learning quickly throughout my career.