# Write a Python program to interchange first and last elements in a list # Python3 program to swap first# and last element of a list# Swap functiondef swapList(newList):    size = len(newList)         # Swapping    temp = newList[0]    newList[0] = newList[size - 1]    newList[size - 1] = temp         return newList     # Driver codenewList = [12, 35, 9, 56, 24]print(swapList(newList))