Python Forum
Is it not possible to begin a for loop by 1 instead of 0
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it not possible to begin a for loop by 1 instead of 0
#8
These are the range arguments: range(start, stop, step).

In [1]: for num in range(2, 21, 2):
   ...:     print(num, end=" ")
   ...:     
2 4 6 8 10 12 14 16 18 20 
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Is it not possible to begin a for loop by 1 instead of 0 - by wavic - Jul-08-2017, 12:13 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020