to change the first character of the string in capital letter in python code example
Example 1: 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
Example 2: python capitalize first letter of string without changing the rest
string[0].upper() + string[1:]