标签:python ali nts integer when tin spec 文件 and
‘‘‘ 时间:2018/10/28 目录: 一: 概述 1 help查看 2 文件查看 3 类型查看 二: 使用 1 说明 2 举例 ‘‘‘
一: 概述
1 help查看
# coding:utf-8 help(range)
Help on class range in module builtins: class range(object) | range(stop) -> range object | range(start, stop[, step]) -> range object
2 文件查看
range(stop) -> range object range(start, stop[, step]) -> range object Return an object that produces a sequence of integers from start (inclusive) to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1. start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3. These are exactly the valid indices for a list of 4 elements. When step is given, it specifies the increment (or decrement).
3 类型查看
# coding:utf-8 print(type(range))
<class ‘type‘>
二: 使用
1 说明
2 举例
标签:python ali nts integer when tin spec 文件 and
原文地址:https://www.cnblogs.com/huafan/p/9867695.html