#!/usr/bin/python
# -*- coding: utf-8 -*-
# Python3 program to swap first
# and last element of a list# Swap function
def swapList(newList):
size = len(newList)# Swapping
temp = newList[0]
newList[0] = newList[size - 1]
newList[size - 1] = tempreturn newList
# Driver codenewList = [12, 35, 9, 56, 24]
print swapList(newList)