Print the value of variable by entering the negative index position in python list
View All Python Programs Source Code n=int(input(“Enter the position : “)) thislist=[“apple”,”banana”,”cherry”] print(thislist[-n]) Output Enter the position : 3 apple View All Python Programs
Print the value of variable by entering the negative index position in python list Read More »