Q. Write a Python program to capitalize first and last letters of each word of a given string.

 

Answer =

 

string = input("Enter a string :-")
new_str = string[0].upper()+string[1:-1]+string[-1].upper()
print(new_str)


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post