Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Computer Science · Glossário

O que é Named tuple?

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

Ler no capítulo →