Python Program Using Numpy And Operator In R