Vidyalelo
Python · Q84

Python Loops and Conditionals: MCQs for Exam Readiness

Programming · Python · question 84

Q84

What will be the output of the following Python code? x = ['ab', 'cd'] for i in x: x.append(i.upper()) print(x)

A.
['AB', 'CD']
B.
['ab', 'cd', 'AB', 'CD']
C.
['ab', 'cd']
D.
none of the mentioned
Answer

Answer: Option D

Solution

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