A tuple, however, is immutable.
然而,tuple是不可变的。
Listing 2. The for loop and a tuple.
清单2 . for循环和tuple。
In particular, I'm going to return a tuple.
特别要注意,我要返回一个数组。
It is going to give me back a tuple a collection of two things, and so check out the syntax.
它将给我返回一个数组或者系列的一对值,然后检查一下语法。
And we're having a difference of opinion as to whether we should use a tuple or a list here, right?
可以“是结果,明白了吗?我们队在这里是应该用数组,还是链表还有一些不同意见对吧?
In fact it gives me back, now I hate this, it's actually a list it's not a tuple. But for now think of it as giving you back an explicit version of that representation of all those elements.
它实际上是一个数组而不是一个元组,但是现在你们可以把它认为,是明确的这些,元素的一个表示,你会在接下来的一些课程中看到。
应用推荐