Answers for "python for loop with increment"

1

python for loop increment

#you can specify incremental values for for loops in python too!
for x in range(1,10,2):
    doSomething(x)
Posted by: Guest on March-14-2020
1

python for loop with increment

lis = [1, 2, 3, 4, 5]
for i in range(len(lis)):
  print(lis[i])
  i+=1
Posted by: Guest on November-02-2020

Code answers related to "python for loop with increment"

Python Answers by Framework

Browse Popular Code Answers by Language