List comprehensions : List Comprehensive : List PYTHON examples


PYTHON examples » List » List Comprehensive »

 

List comprehensions


List comprehensions: map and tuple

listoftuple = [('bob', 35'mgr'), ('mel', 40'dev')]

print [age for (name, age, jobin listoftuple]

print map((lambda (name, age, job): age), listoftuple)


           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo List
» List Comprehensive