Home » Programming Language (coding) » Python MCQs » Study the following program: x = [‘xy’, ‘yz’] for i in a: i.upper() print(a)

Study the following program: x = [‘xy’, ‘yz’] for i in a: i.upper() print(a)

Study the following program:

x = ['xy', 'yz']  
for i in a:  
    i.upper()  
print(a)  

Which of the following is correct output of this program?

A. [‘xy’, ‘yz’]
B. [‘XY’, ‘YZ’]
C. [None, None]
D. None of these

Correct Answer: Option A. [‘xy’, ‘yz’] 

Take Part in Discussion:

Your email address will not be published.

Solve : *
25 + 3 =