fork download
  1. def transpose(matrix):
  2. listOfLists = []
  3. for row in range(len(matrix[0])):
  4. colList = []
  5. for col in range(len(matrix)):
  6. colList.append(matrix[col][row])
  7. listOfLists.append(colList)
  8. return listOfLists
  9.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
def transpose(matrix):
^
1 error
stdout
Standard output is empty