全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 List, item, index, length?

又称: list · item (of a list) · index · length (of a list)

Definition 20.1 Primary & Middle School Computer Science · 第 20 章 — Lists

A list is a value that holds other values in order. It is written between square brackets, with commas: [0.0, 0.7, 6.9]. Each value is an item of the list. The position of an item is its index, counted from 0: L[0] is the first item, L[1] the second. The length of a list is its number of items, given by len(L).

A list is a row of cells. The indices, under the cells, run from 0 to len(rain) - 1 = 30.
A list is a row of cells. The indices, under the cells, run from 0 to len(rain)−1=30\texttt{len(rain)} - 1 = 30.
在原文中阅读 →