""" Write a function changeString that has one parameter - string. The function returns a new string based on the following rules: first and last characters are swapped all other characters remain the same Write main to test your function. """ def changeString(str): new_str=str[-1]+str[1:-1]+str[0] return new_str def main(): #create a list of strings first, and then create a list of new strings list=[] for i in range(5): str=input("enter string ") list.append(str) print("list of strings") print(list) new_list=[] for item in list: new_list.append(changeString(item)) print("new list") print(new_list) main()