Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to for loop in python stackoverflow

mylist = [1,2,3]
for item in mylist:
    print item

mydict  = {1:'one', 2:'two', 3:'three'}
for key in mydict:
    print key, mydict[key]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #python #stackoverflow
ADD COMMENT
Topic
Name
9+1 =