Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make a for loop increment by 2 in python

for i in range(0, 11, 2): #range follows (start, stop, step)
  print(i)
# 0 2 4 6 8 10
 
PREVIOUS NEXT
Tagged: #loop #increment #python
ADD COMMENT
Topic
Name
6+9 =