下列关于Python中map高阶函数的代码运行结果与特性描述,正确的是?
已知如下两段Python代码:
# 代码1
nums = [1, 2, 3]
res = map(lambda x: x + 1, nums)
print(res)
# 代码2
nums = [1, 2, 3]
res = list(map(lambda x: x + 1, nums))
print(res)
请根据上述代码选择正确的说法:
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析