Using Reduce With Array Of Structures In Python