Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu List, item, index, length?

Dikenal juga sebagai: list · item (of a list) · index · length (of a list)

Definition 20.1 Primary & Middle School Computer Science · Bab 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.
Baca dalam konteks →