Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Named tuple?

Definition 2.2 High School Computer Science · Bab 2 — Tuples, Sets and Comprehensions

A named tuple is a tuple whose positions also have names, so that b.year and b[2] read the same value. In Python, namedtuple("Book", ["title", "author", "year"]), from the module collections, creates a new type Book of such tuples.

Baca dalam konteks →