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