Answers for "capitalize first letter of each word python"

4

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
1

python capitalize first letter of each word in a string

>>> "hello world".title()
'Hello World'
>>> u"hello world".title()
u'Hello World'
Posted by: Guest on June-24-2021
3

capitalize first letter of each word python

"hello world".title()
'Hello World'
>>> u"hello world".title()
u'Hello World'
Posted by: Guest on May-27-2020
0

capitalize first letter of each word python

# Use title() to capitalize the first letter of each word in a string.
name = "elon musk"
print(name.title())
# Elon Musk
Posted by: Guest on June-13-2021

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

Python Answers by Framework

Browse Popular Code Answers by Language