全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Named tuple?

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

在原文中阅读 →