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