s = "python"
print("Original string:")
print(s)
print("After capitalizing first letter:")
print(s.capitalize())
# 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
def decapitalize(str):
return str[:1].lower() + str[1:]
print( decapitalize('Hello') ) # hello
my_string = "programiz is Lit"
cap_string = my_string.capitalize()
print(cap_string)
x = "string"
y = x[:3] + x[3].swapcase() + x[4:]
my_string = "programiz is Lit"
print(my_string[0].upper() + my_string[1:])