reduce

Adding reduce to problem 5 for python 3