+ 2
How to select elements at 0th position from 2d lists
Assume a 2d list in python. How would you select all the elements present in first coloumn and add them to another list.
1 Answer
+ 4
firstcol = [r[0] for r in list2d]
https://code.sololearn.com/cvisCTyjf4A3/?ref=app