Mid2 19th_Interchange_First_and_Last

 l=[1,2,3,4,5,6,7]

temp=l[0]
l[0]=l[6]
l[6]=temp
print(l)
#output:
[7, 2, 3, 4, 5, 6, 1]

Comments

Popular posts from this blog

JAVA Lab Programs

HANGMAN GAME

WD 22. StylingLinks&Buttons