Using Reduce With Array Definition In Python