题目
题目

CIS-502-OLH-CRN47621 Optional Practice Final Exam

单项选择题

Python enables the programmer to filter a list (also called list comprehension).   The Python lambda function enables a programmer to define "anonymous" functions. For the list, a, defined below what would be the filtered result? a = [ 2, 3, 5, 7, 8, 10] filter(lambda x: not (x % 2), a)

查看解析

查看解析

标准答案
Please login to view
思路分析
The question presents a Python list a = [2, 3, 5, 7, 8, 10] and uses a filter with the lambda x: not (x % 2). First, understand what the lambda does: for any x, x % 2 computes the remainder after division......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!