Write a Python program to change a given string to a new string where the first and last chars have been exchanged. code example
Example: Write a Python program to change a given string to a new string where the first and last chars have been exchanged.
n=input("Enter a string : ")
print(n[-1:]+n[1:-1]+n[:1])