Computer Science, asked by shikharchaudhary686, 6 months ago

Write a program to input a sentence and convert it into lowercase and print a new
sentence after interchanging first word with last word & vice-versa.
Example:
Sample input
WE ARE IN CYBER WORLD
Sample output
world are in cyber we​

Answers

Answered by valeriy69
2

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

s = input("enter text: ").split()

s[0], s[-1] = s[-1], s[0]

print(" ".join(s).lower())

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions