List Comprehension : List Comprehension : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » List Comprehension »

 

List Comprehension


print [x*x for x in range(10)] 

print [x*x for x in range(10if x % == 0
print [(x, yfor x in range(3for y in range(3)]

li = [1984
print [elem*for elem in li]                   
print li                                             
li = [elem*for elem in li]                  
print li



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo List
» List Comprehension