Skip to content

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
See also  Python code snippet - How to know the length of a dataset tensorflow?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.