Home ยป Programming Language (coding) ยป Python MCQs ยป What will be the output of the following Python code? >>>t = (1, 2, 4, 3, 8, 9) >>>[t[i] for i in range(0, len(t), 2)]

What will be the output of the following Python code? >>>t = (1, 2, 4, 3, 8, 9) >>>[t[i] for i in range(0, len(t), 2)]

What will be the output of the following Python code?

>>>t = (1, 2, 4, 3, 8, 9)
>>>[t[i] for i in range(0, len(t), 2)]

A. [2, 3, 9]
B. [1, 2, 4, 3, 8, 9]
C. [1, 4, 8]
D. (1, 4, 8)

Correct Answer: Option C. [1, 4, 8] 

Take Part in Discussion:

Your email address will not be published.

Solve : *
2 + 7 =