Python Readable 
\n        for row in xrange(len(A)):\n            A[row] = A[row][::-1] # reverse the row\n            \n            for invert in xrange(len(A[row])): # invert
```\n        for row in xrange(len(A)):\n            A[row] = A[row][::-1] # reverse the row\n            \n            for invert in xrange(len(A[row])): # invert each element\n                if A[row][invert] == 0:\n                    A[row][invert] = 1\n                else:\n                    A[row][invert] = 0\n                    \n        return A\n```
[]