Using Python I want to convert:
outputlist = []
list = [[1,2,3],[a,b,c],[p,q,r]]
outputlist =[[1,a,p],[2,b,q],[3,c,r]]
How do I do this?
outputlist.append([li [0] for li in list ])
it yields
[1,a,p]
not the other items. I need it for all of the items.