print 2d array in python
for i in A:
print('\t'.join(map(str, i)))
print 2d array in python
for i in A:
print('\t'.join(map(str, i)))
create a 2d array in python
def build_matrix(rows, cols):
matrix = []
for r in range(0, rows):
matrix.append([0 for c in range(0, cols)])
return matrix
if __name__ == '__main__':
build_matrix(6, 10)
python print 2d array as table
import numpy as np
print(np.matrix(A))
python print 2d array as table
for row in A:
for val in row:
print '{:4}'.format(val),
print
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us