Discuss / Python / 有点疑问

有点疑问

Topic source

nstart0902

#1 Created at ... [Delete] [Delete and Lock User]

先交作业

def is_palindrome(n):

    n=str(n)

    return n==n[::-1]

it=filter(_not_divisible(n),it)

def _not_divisible(n):

    return lambda x: x % n > 0

filter的第一个参数的函数可以传参数的? _not_visible的x是谁传进去的,Iterable对象的元素是传给n还是传给x?


  • 1

Reply