Advertisement
davide1409

modMatrix

Dec 19th, 2019
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def modMatrix(m,x):
  2. #@param m: matrice nxn di interi
  3. #@param x: int
  4.  
  5.   w = len(m)
  6.   if x<0 or x>=w:
  7.     return
  8.  
  9.   else:
  10.     for k in range(w):
  11.       m[x][k],m[k][x] = m[k][x],m[x][k]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement