Examveda

What will be the output of the following Python code?
myList = [1, 2, 3, 4, 5, 6]
for i in range(1, 6):
    myList[i - 1] = myList[i]
 
for i in range(0, 6): 
    print(myList[i], end = " ")

A. 2 3 4 5 6 1

B. 6 1 2 3 4 5

C. 2 3 4 5 6 6

D. 1 1 2 3 4 5

Answer: Option C


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python