奇怪的奖状# Joke - 肚皮舞运动
a*n
1 楼
只用过很短时间的python,面试的那家发来一些题目,其中一道是关于python的,能帮
忙解答一下吗?谢谢
There's a problem with the following Python 2.x code, please fix it.
print reduce(lambda x, y: x+y, filter(lambda x: x%2, map(lambda x: x*x,
xrange(10**6)))) = sum(x*x for x in xrange(1, 10**6, 2))
After the fix, what would be printed? Explain the result.
忙解答一下吗?谢谢
There's a problem with the following Python 2.x code, please fix it.
print reduce(lambda x, y: x+y, filter(lambda x: x%2, map(lambda x: x*x,
xrange(10**6)))) = sum(x*x for x in xrange(1, 10**6, 2))
After the fix, what would be printed? Explain the result.