Map And Reduce Functions In Python