2-6 filte()函数任务我这么写为什么不对?
import math
def is_sqr(x):
return x and isinstance(math.sqrt(x),int)
print filter(is_sqr, range(1, 101))
import math
def is_sqr(x):
return x and isinstance(math.sqrt(x),int)
print filter(is_sqr, range(1, 101))
2017-08-28
举报