Python Program to Capitalize the First Character of a String Using capitalize() Function
#Capitalize the First Character of a String Using str.capitalize() in python
s = "python"
print("Original string: "+ s)
# string.capitalize () function takes the string argument and returns the first letter of the capitalized word
print("After capitalizing the first letter: "+ s.capitalize())
Output:
Original string: python
After capitalizing the first letter: Python
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.