Print the first character in lower case and last character in upper case in a sentence

–1 vote
asked Sep 10, 2019 by anonymous

1 Answer

+1 vote
answered Sep 11, 2019 by sneha
x=input()

a=x[0].lower()

b=x[len(x)-1].upper()

print(a+x[1:len(x)-1]+b)
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...