Python Program Using Numpy And Operator Matlab For Loop