I am trying to create a matrix transpose function for python but I can\'t seem to make it work. Say I have
theArray = [[\'a\',\'b\',\'c\'],[\'d\',\'e\',\'f\
def transpose(matrix): listOfLists = [] for row in range(len(matrix[0])): colList = [] for col in range(len(matrix)): colList.append(matrix[col][row]) listOfLists.append(colList) return listOfLists