好词典

tuples

UK //ˈtjuːpəlz//US //ˈtuːpəlz//

词源

源自拉丁语 'tuplus',意为“倍数”或“多个”,后演变为数学和计算机科学中的术语。

noun

❶ 元组,指由多个元素组成的有序序列,常用于数学、计算机编程等领域。元组中的元素可以是不同类型,且一旦创建通常不可更改。

“In Python, tuples are defined using parentheses.”

(在 Python 中,元组是用圆括号定义的。)

“A tuple can contain integers, strings, and other data types.”

(一个元组可以包含整数、字符串和其他数据类型。)

同义词:sequence, ordered pair, n-tuple

常见短语

tuple assignment — 元组赋值,指同时将多个值赋给多个变量,常用于编程语言中简化代码。

“In Python, you can use tuple assignment to swap two variables: a, b = b, a.”

(在 Python 中,你可以使用元组赋值来交换两个变量:a, b = b, a。)