List comprehensions : List Comprehensive : List PYTHON examples


PYTHON examples » List » List Comprehensive »

 

List comprehensions


List comprehensions: for and tuple



print [x+y for x in 'spam' for y in 'SPAM']

print [(x,yfor x in range(5if x%== for y in range(5if y%== 1]


           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo List
» List Comprehensive