What will be the output of the following Python code? [code]def to_upper(k): k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))[/code]

Lan Anh

New member
What will be the output of the following Python code?
Code:
def to_upper(k):
    k.upper()
x = ['ab', 'cd']
print(list(map(to_upper, x)))
A. [‘AB’, ‘CD’]
B. [‘ab’, ‘cd’]
C. none of the mentioned
D. error
 

Tìm kiếm

Back
Top