Check the below example:
input: I live in New York
output: York New in live I
P.S: I have utilized s[::- 1], this simply turns around the string, as kroY weN ni evil I, yet this isn't the ideal yield. I additionally attempted :
However, this likewise stands wrong. Compassionately help me recorded as a hard copy of the code.