Discuss / Python / 作业

作业

Topic source
def is_odd(n):
    return n % 2 == 1

L = list(filter(is_odd, range(1, 20)))
print(L)
print('=======================================================================')
L = list(filter(lambda n: n % 2 == 1, range(1, 20)))

  • 1

Reply