import csv

def loadMatrixAandB(FILENAME1):
	#import the first CSV file
	with open(FILENAME1, newline = '') as csvfile:
		# Initialize data to a list of empty objects
		dataA = []
		for row in csv.reader( csvfile, delimiter = ',' ):
			# ...append the whole row as an object. ’row’ is a 9 length vector.
			dataA.append(row)
	return dataA

def identity(matrix):
	result = []
	for row in range(0, len(matrix)):
		temp = [] # used to fill rows in the next level
		for col in range(0, len(matrix)):
			if (row == col):
				temp.append(1)
			else:
				temp.append(0)
		result.append(temp)
	return result

A = loadMatrixAandB("A.csv")
#B = loadMatrixAandB("B.csv")

result = identity(A)

print(result)