Use Reduce Function In Python