Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python print every n loops

for x in 100:
    #what to do every time (100 times): replace this line with your every-iteration functions.
    if x % 5 == 0:
        #what to do every 5th time: replace this line with your nth-iteration functions.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #print #loops
ADD COMMENT
Topic
Name
5+4 =