Answers for "capitalize letter of each word python"

3

python capitalize all words

sample_text = "this is a sample string"
result = sample_text.title() # "This Is A Sample String"
Posted by: Guest on September-26-2021
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 letter of each word python"

Python Answers by Framework

Browse Popular Code Answers by Language