Divide And Conquer Method In Python