Appending items to a list. : Loop through : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Loop through »

 

Appending items to a list.


playList = []     # list of favorite plays

for i in range):
   playName = raw_input"Play %d: " i + ) )
   playList.appendplayName )
   
print "nSubscript     Value"

for i in rangelenplayList ) ):
   print "%9d     %-25s" i + 1, playList] )



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo List
» Loop through