Write a Python Program to Form a New String where the First Character and the Last Character have been Exchanged
Topic: Write a Python Program to Form a New String where the First Character and the Last Character have been Exchanged
Solution
def change(string): return string[-1:] + string[1:-1] + string[:1]
List all Python Programs