def performOps(A): m = len(A) n = len(A[0]) B = [] for i in xrange(len(A)): B.append([0] * n) for j in xrange(len(A[i])): B[i][n - 1 - j] = A[i][j] return B
[[1,2,3,4],[5,6,7,8],[9,10,11,12]]
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!