And the nice thing is that there's a shared behavior there. Just as I can have tuples as an ordered collection of things, strings behave as an ordered collection of things.
共享的行为,就像元组是有序的元素序列,字符串也是有序的元素序列,因此我可以对字符串做同样的操作,我可以把它们连结起来。
I shouldn't say list, those two tuples, and walk through them to find the pieces that match up.
除数数组进行对比,我不该说数组的,是元组,遍历这两个元组找到相同的元素。
Now what I'd like to do, every time I find a divisor I'd like to gather it together. So I'm going to create a tuple of one element, the value of i.
那么我就会去创建只包含一个元素的元组,也就是这个除数了,然后,啊,很好,这里是加法重载的一个很糟糕的应用。
应用推荐