I'm not getting how to proceed with this problem in lists,can any one help me out? Thanks in advance.
input is :
l = [(1,2),(3,4),(5,6)]
output is:
[(1,3,5),(2,4,6)]
Oneliner:
list(zip(*l)) # [(1, 3, 5), (2, 4, 6)]
2.1m questions
2.1m answers
60 comments
57.0k users