icu222much
0
Light Poster
Recommended Answers
Jump to PostWhen you use the range function each iteration of the loop sets the value of i back to what the next step in range is. Luckily for you, you can specify how many numbers you want range() to skip on each pass by setting the step
for …
Jump to PostThis loop will increment by 2!
for f in range(start=0, end=10, step=2): print f
Just replace 2 with anything you need
All 6 Replies
mn_kthompson
3
Junior Poster
icu222much
0
Light Poster
lllllIllIlllI
178
Veteran Poster
icu222much
0
Light Poster
woooee
814
Nearly a Posting Maven
icu222much
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.