The Glue1D.place method returns a 2-tuple of (oadd, cadd) integers.
place方法返回整数(oadd,cadd)的一个二元组。
This paper proposes, a 2-tuple linguistic model of information retrieval.
提出一个基于二元语义的信息检索模型。
In Listing 2, the program will evaluate the expression four times, once for each tuple.
在清单2中,程序将对表达式进行四次求值,每次对一个元组求值。
The two sides of the operation must match (that is, if you have 2 element tuple as the pattern, the expression must resolve to a 2 element tuple).
操作的两边必须匹配(也就是说,如果模式是包含两个元素的元组,那么表达式的计算结果也必须是包含两个元素的元组)。
After creating a simple tuple, the previous example shows how to select a single item — in this case, the integer 2.
在创建简单的tuple之后,前面的示例显示如何选择一个数据项——在本示例中是整数2。
So, t [2:7] slices the third through the seventh items from the tuple, while t [2:7:2] slices every other item, starting with the third item and continuing through the seventh item from the tuple.
因此,t[2:7]将tuple中的第三到第七个数据项分段,而t[2:7:2]则对每两个数据项进行分段,从tuple中的第三个数据项开始一直到第七个数据项。
In Listing 2, you can see that each element in a tuple can be of a different type, but the types in a list must be homogeneous.
在清单2中,可以看到tuple中的每个元素可以是不同类型的,但列表中的元素必须是相同类型的。
Part 2 of this series, Discover Python, Part 2, introduced the tuple, which also was an immutable sequence.
本系列的第 2部分探索Python,第 2 部分介绍了tuple,它也是一个不变的序列。
An alternative method to accomplish the same result would test whether the current item in the tuple is even (using if not num % 2:) and, if true, would add the current item to the running total.
实现相同结果的另一种方法是测试tuple中的当前项是否是偶数(使用ifnot num %2:),如果为真,那么将当前项添加到运行总和中。
The second for loop shown in Listing 2 also iterates over all elements in the tuple.
清单2中显示的第二个for循环也迭代tuple中的所有元素。
Listing 2 demonstrates how to use a for loop to iterate through the elements of a tuple.
清单2演示了如何使用for循环迭代tuple的元素。
"Discover Python, Part 2" discusses the Python type hierarchy and provides a discussion of the Python tuple.
“探索python,第2部分”讨论了python类型的层次结构以及Python tuple。
Listing 2. The for loop and a tuple.
清单2.for循环和tuple。
Listing 2. The for loop and a tuple.
清单2.for循环和tuple。
应用推荐