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