Q. Write a program which reverses a string and stores the reversed string in a new string.
Answer :-
string = input("Enter a string :- ")
newstring = string[-1:-len(string)-1:-1]
print(newstring)
Output :-
Enter a string :- Portal Express
sserpxE latroP
>>>
sserpxE latroP
>>>
Enter a string :- Python
nohtyP
>>>
nohtyP
>>>
hey path walla why no new questions yet
ReplyDeletejust a request please take u r time to publish
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )