Answers for "only capitalize first letter of each word in python string"

6

how to capitalize first letter in python

# To capitalize the first letter in a word or each word in a sentence use .title()
name = tejas naik
print(name.title())    # output = Tejas Naik
Posted by: Guest on November-22-2020
0

Capitalize first letter in python

s = "python"
print("Original string:")
print(s)
print("After capitalizing first letter:")
print(s.capitalize())
Posted by: Guest on November-15-2021

Code answers related to "only capitalize first letter of each word in python string"

Python Answers by Framework

Browse Popular Code Answers by Language