I've been trying to figure out how to transpose a matrix (represented as a list of lists) in Python using map and filter only recursively. I;ve tried various implementations and none of them work. Here's what I have currently:
def transpose(matrix):
return list(map(lambda x: [x], list(filter(lambda x: [0], matrix))))
All other answers using for loops and/or zip functions which is a restriction.
Any directions would be helpful too