# b = filter(lambda x:x>5,[1,2,3,4,5,6,7])
# print(list(b))
def filters(x):
    if x > 5:
        return x

b = filter(filters,[1,2,3,4,5,6,7])
print(list(b))#[6, 7]

def maps(x):
    if x > 5:
        return x

b = map(maps,[1,2,3,4,5,6,7])
print(list(b))#[None, None, None, None, None, 6, 7]

 

相关文章:

  • 2021-10-06
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-08-17
  • 2021-12-19
猜你喜欢
  • 2021-11-11
  • 2022-12-23
  • 2021-08-11
  • 2021-10-24
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案