Update index.md
This commit is contained in:
@ -20,9 +20,12 @@ for i in range(5):
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Example with optional additional arguments
|
#### Example with optional additional arguments
|
||||||
The first argument, *start* includes the number at which to start the progression.
|
The first argument, *start*, is the starting number of the sequence.
|
||||||
The second argument, *stop* is the same as in the example above, and the progression stops before this number.
|
|
||||||
The third argument, *step* is for when you want to generate numbers, but at a step greater than one.
|
The second argument, *stop*, means to generate numbers up to, but not including this number.
|
||||||
|
|
||||||
|
The third argument, *step*, is the amount to increment by. In other words, it's the difference between each number in the sequence. It defaults to 1 if step is not specified.
|
||||||
|
|
||||||
```py
|
```py
|
||||||
for i in range(3, 12, 2):
|
for i in range(3, 12, 2):
|
||||||
print(i)
|
print(i)
|
||||||
|
Reference in New Issue
Block a user