#Python program to interchange first and last elements in a list
#Swapping Function Thank you for watching
def output(lst):
l=len(lst)
#Swapping
t = lst[0]
lst[0] = lst[l-1]
lst[l-1] = t
return lst
lst = [9,10,11,14,17,19]
print(output(lst))
#python #programming #coding #programmer #developer #code #software #tech #pythonproblem #function
On this page of the site you can watch the video online Python program to interchange first and last elements in a list? with a duration of hours minute second in good quality, which was uploaded by the user DevOps Rulers 12 September 2021, share the link with friends and acquaintances, this video has already been watched 475 times on youtube and it was liked by 4 viewers. Enjoy your viewing!