问题:
name 'reduce' is not defined
解决:
from functools import reduce
原因:
在python 3.0.0.0以后, reduce已经不在built-in function里了