def is_odd(n):return n % 2 == 1newlist = filter(is_odd, range(1,11))print(list(newlist))
查看答案
import mathdef is_sqr(x):return math.sqrt(x) % 1 == 0newlist = filter(is_sqr, range(1, 101))print(list(newlist))
def is_odd(n):return n%2 == 1lst1 = filter(is_odd,[1,2,3,4,5,6,7,8,9,10])list(lst1)值为?