0

I have a list like:

[[a,b],[c,d]]

and i want to have:

[[a,c],[b,d]]

using only functional programming.

awesoon
  • 32,469
  • 11
  • 74
  • 99

1 Answers1

1

Zip is your friend!

print(list(zip(*[[1,2],[3,4]])))
Yoav Glazner
  • 7,936
  • 1
  • 19
  • 36