mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-07 23:38:32 +00:00
[python/en] Range function arguments.
Range function with start and stop.
This commit is contained in:
parent
d20eb1fb94
commit
8cfb7ba02f
@ -339,6 +339,18 @@ prints:
|
|||||||
for i in range(4):
|
for i in range(4):
|
||||||
print(i)
|
print(i)
|
||||||
|
|
||||||
|
"""
|
||||||
|
"range(lower, upper)" returns a list of numbers
|
||||||
|
from the lower number to the upper number
|
||||||
|
prints:
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
"""
|
||||||
|
for i in range(4, 8):
|
||||||
|
print(i)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
While loops go until a condition is no longer met.
|
While loops go until a condition is no longer met.
|
||||||
prints:
|
prints:
|
||||||
|
Loading…
Reference in New Issue
Block a user