Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c1753b

Browse files
Update range.md with Examples
I gave more examples for the range built-in function. I do not think that this is complete and will add more when I can but I wanted to add at least a few more examples to allow developers to see it in use.
1 parent9044f1d commit2c1753b

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

‎docs/builtin/range.md‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,72 @@ Python range() built-in function
2828
# 4
2929
```
3030

31+
```python
32+
>>>for iinrange(1,8):
33+
...print(i)
34+
# 1
35+
# 2
36+
# 3
37+
# 4
38+
# 5
39+
# 6
40+
# 7
41+
```
42+
43+
```python
44+
>>>for iinrange(0,30,5):
45+
...print(i)
46+
# 0
47+
# 5
48+
# 10
49+
# 15
50+
# 20
51+
# 25
52+
```
53+
54+
```python
55+
>>>for iinrange(0,10,3):
56+
...print(i)
57+
# 0
58+
# 3
59+
# 6
60+
# 9
61+
```
62+
63+
```python
64+
>>>for iinrange(0,-6,-1):
65+
...print(i)
66+
# 0
67+
# -1
68+
# -2
69+
# -3
70+
# -4
71+
# -5
72+
```
73+
74+
```python
75+
>>>for iinrange(0,-6,-1):
76+
...print(i)
77+
# 0
78+
# -1
79+
# -2
80+
# -3
81+
# -4
82+
# -5
83+
```
84+
85+
```python
86+
>>>for iinrange(0):
87+
...print(i)
88+
#
89+
```
90+
91+
```python
92+
>>>for iinrange(1,0):
93+
...print(i)
94+
#
95+
```
96+
3197
<!-- remove this tag to start editing this page-->
3298
<empty-section />
3399
<!-- remove this tag to start editing this page-->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp