Answers for "how to make a for loop increment by 2 in python"

3

python for loop jump by 2

for i in range(0,10,2):
  print(i)
Posted by: Guest on November-01-2020
0

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
Posted by: Guest on July-22-2021

Code answers related to "how to make a for loop increment by 2 in python"

Python Answers by Framework

Browse Popular Code Answers by Language