+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.

6/30/2019 6:11:39 PM

Manoj Kumar

1 Answer

New Answer

+4

firstcol = [r[0] for r in list2d] https://code.sololearn.com/cvisCTyjf4A3/?ref=app