>>> help(range)
Help on built-in function range in module __builtin__:
range(...)
range([start,] stop[, step]) -> list of integers
Return a list containing an arithmetic progression of integers.
range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.
When step is given, it specifies the increment (or decrement).
For example, range(4) returns [0, 1, 2, 3]. The end point is omitted!
These are exactly the valid indices for a list of 4 elements.
【help of python】range函数
最新推荐文章于 2025-04-11 17:41:25 发布
本文详细介绍了 Python 中的内置函数 range 的使用方法。range 函数用于生成整数序列,适用于循环控制等场景。文章解释了 range 函数的不同参数组合及其实现的功能,包括指定起始值、结束值和步长等。
1963

被折叠的 条评论
为什么被折叠?



