Vidyalelo
Python · Q137

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 137

Q137

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
Answer
D.
1 1 2 3 4 5

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board