Advertisement
santiagol26

elementos unicos de una matriz

Apr 28th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. matriz=[[7,4,5],[2,4,1],[2,3,9]]
  2. numeros=[]
  3.  
  4. for j in range(0,len(matriz)):
  5.     for m in range(0,len(matriz)):
  6.         if not(matriz[j][m] in numeros):
  7.              numeros.append(matriz[j][m])
  8.         elif matriz[j][m] in numeros:
  9.             numeros.remove(matriz[j][m])
  10.  
  11. print("Numeros unicos",numeros)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement