Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Named tuple?

Definition 2.2 High School Computer Science · Hoofdstuk 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.

Lees in het hoofdstuk →