change increment in for loop python 1

change increment in for loop python

for i in range(0, 10, 3):

Here is what the above code is Doing:
1. The range() function is used to generate a sequence of numbers.
2. The range() function takes three arguments: start, stop, and step.
3. The start argument is the first number of the sequence.
4. The stop argument is 1 more than the last number of the sequence.
5. The step argument is the difference between each number in the sequence.

Similar Posts