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)]
1.4m articles
1.4m replys
5 comments
57.0k users