In other words it doesn't just return when it finds one, it's going to run through all of them. All right?
但是它将会继续运行,换句话来说当它找到一个结果时,它不会立刻返回结果它会先遍历所有的内容?
All right. I was going to do one more example, but I've run you up to the end of the time.
好,本来想再讲个例子的,但是我想该下课了。
Well,you--By this point,you can run through all the possibilities yourself,right?
现在你们自己能分析这些可能性了?
All right, so let's actually run this thing.
好的,让我们来运行它。
So if you run into a problem set that just, you don't get, all right? Seek help. Could be psychiatric help, could be a TA. I recommend the TA.
所以如果你碰到了一个,你不懂的问题,好么?求助,可以是精神科,可以是一个助教,我推荐助教。
All right? If you run it, you have a sense of the upper bound, about how much time it's going to take to do this computation, so you're not going to get surprised by something showing up.
第一,这样做意味着没有意外了对不对?,你去运行程序,你已经大致知道运行时间的上限了,因此发生任何事情,你都不会吃惊了。
And that does two things: bug one, it helps catch bugs in your code, and secondly it often converts it into a more efficient sequence of instructions before you actually go off and run it. All right?
这有两点好处:,第一是可以帮助你发现程序中的,第二是把你的代码,在运行之前,转换为更有效率的指令的集合,对不对?
All right. So let's run it.
好了,让我们来运行一下。
It's going to let j run over the length of the list all right, so it's going to start at some point to move down, and then it's going to let i run over range, that's just one smaller, and what's it doing there?
就在这里,会做什么呢?,我们让j遍历这个列表,好的,它要从某一定开始移动,然后让i也跑遍整个范围,就是比之要小一,会发生什么?
All right, I'm going to run copy one enter.
好的,然后run,copy1,回车。
应用推荐