L Lan Anh New member Sep 20, 2021 #1 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
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
K Kim Trang New member Sep 20, 2021 #2 Answer: c Explanation: A list of Nones is printed as to_upper() returns None. Upvote 0 Downvote