tablica = [ [1,2,3], [4,5,6], [7,8,9] ] ''' 1 -> (0,0) 5 -> (1,1) 9 -> (2,2) ''' def zeros(tab, n): for i in range(n): tab[i][i] = 0 ''' def parzyste2dV3(tab, wiersze, kolumny): for w in range(wiersze): for k in range(kolumny): e = tab[w][k] if e % 2 == 0: print(e) ''' def zerosV2(tab, n): for w in range(n): for k in range(n): if w==k: tab[w][k] = 0 zerosV2(tablica, 3) for row in tablica: print(row)