使用匿名函数和filter()函数,将下列列表中大于0的元素过滤处理形成新列表:
list1=[3,-6,62,0,-11,4,71,-88,0,-6,77] for i in range(1): new_list=list(filter(lambda x:x>0,list1)) print(new_list)
使用匿名函数和filter()函数,将下列列表中大于0的元素过滤处理形成新列表:
list1=[3,-6,62,0,-11,4,71,-88,0,-6,77] for i in range(1): new_list=list(filter(lambda x:x>0,list1)) print(new_list)