Use uniformed reduce operator to work in Python3