Wednesday, 11 September 2013

Getting list out of python list of list

Getting list out of python list of list

I am using python list of list as follows,
List L = [ ['a',4] ['b',2] ,['c',13]]
I want to generate new List for all the number which are the position
second in each set of the list
New List L* = [ 4, 2, 13]
Is there any shortcut in python to get above L* list

No comments:

Post a Comment