Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « List, item, index, length » ?

Aussi appelé : list · item (of a list) · index · length (of a list)

Definition 20.1 Primary & Middle School Computer Science · Chapitre 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.
Lire dans le chapitre →