Vidyalelo
Python · Q31

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 31

Q31

What will be the output of the following Python code snippet? x = [i**+1 for i in range(3)]; print(x);

A.
[0, 1, 2]
Answer
B.
[1, 2, 5]
C.
error, **+ is not a valid operator
D.
error, ';' is not allowed

Answer: Option A

Solution

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