第30715题 单选题
运行如下Python代码,最终的输出结果是?
def func(x):
    return x % 2 == 0 and x > 3
nums = [1, 2, 3, 4, 5, 6, 7, 8]
res = list(filter(func, nums))
print(res)
A

[4, 6, 8]

B

[2, 4, 6, 8]

C

[4, 5, 6, 7, 8]

D

<filter object at 0xXXXXXXXX>

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析