Search
x = [[0, 1], ['a', True], [1, 1.0, 2, 4]] >>> len(x) 3 >>> len(x[0]) 2 >>> x[1][1] True >>> type(x) <class 'list'> >>> type(x[0]) <class 'list'>
x = [] for i in range(2): x.append([0] * 3) >>> print(x) [[0, 0, 0], [0, 0, 0]]
printMatrix
multiVecMat(v,m)
None
m=[[0,0,1],[0,1,0],[1,0,0]] v=[2, 4, 6]
1 2 3 4 0 5 7 -1 2
pole=[] f=open('matice.txt','rt') for line in f: pole.append(list(map(int, line.split()))) f.close() print(pole)
[[1,2,3],[4,0,5],[7,-1,2]]
Implementujte následující úlohy: