The for loop and sequence indexing
for 循环和序列索引
Listing 4. The for loop and a list.
清单4.for循环和list。
Listing 2. The for loop and a tuple.
清单2.for循环和tuple。
Listing 3. The for loop and a string.
清单3.for循环和string。
Listing 1. Pseudocode for the for loop.
清单1.for循环的伪代码。
Listing 10. Pseudocode for the for loop.
清单10.for循环的伪代码。
You might have expected an extra for loop.
您可能已经预料到一个额外的for循环了。
The next for loop processes just the HTTP links only.
接下来将只对HTTP链接进行循环处理。
Thus, the third for loop finds two additional vowels.
因此,第三个for循环可找到另外两个元音字母。
The button is clicked three times, using the for loop.
按钮通过for循环被按了3次。
Now instinctively, prefer the for loop or the while loop?
现在凭感觉,你们喜欢for循环还是while循环?
The end of that article introduced the Python for loop.
该文的结尾介绍了Python for循环。
Listing 4 demonstrates how to use a list with a for loop.
清单4演示了如何使用list和for循环。
The for loop is demonstrated in pseudocode format in Listing 10.
清单10中的伪代码格式演示了for循环。
You can easily use a for loop within bash to do the job quickly.
在bash中,可以使用for循环轻松地实现这个目标。
The sequence diagram for the above for loop is shown in Figure 5.
图 5显示了上述for 循环的序列图。
You use a simple for loop to iterate through the posts in the blog.
可以使用简单的for循环遍历blog中的全部post。
In the case of a for loop, three additional data fields are generated.
对于for循环情况,会生成三个附加数据字段。
YAMD tells us that we have an out-of-bounds condition in the for loop.
YAMD告诉我们在for循环中有“越界(out - of -bounds)”的情况。
The for loop essentially says "for each item element, do the following."
for循环实际是说“对每个item元素,做以下事情。”
Here's an example of a for loop written on the fly (shown in Listing 19).
下面是即时编写的for循环示例(见清单19)。
You already know how to use a for loop. Now let's talk about conditionals.
您已经了解了如何使用for 循环;现在,我们来讨论条件语句。
The second for loop in this example demonstrates how to avoid this problem.
本例中的第二个for循环演示了如何避免此问题。
Up to this point we've been traversing the record store with a simple for loop.
至此,我们已经使用一个简单的for循环遍历了记录存储。
You can do this with a very simple for loop, as demonstrated in Listing 7 below.
您可以使用一个非常简单的for循环来完成这项任务,如下面的清单7所示。
The for loop iterates over the list of strings, printing them out one at a time.
for 循环在string列表上进行迭代,一次输出一行。
The Python for loop may seem odd if you've ever used another programming language.
如果您用过其他编程语言,Pythonfor循环可能看起来有点儿古怪。
Listing 3 demonstrates how to use a Python string as the container for a for loop.
清单3演示了如何使用Pythonstring作为for循环的容器。
The second for loop shown in Listing 2 also iterates over all elements in the tuple.
清单2中显示的第二个for循环也迭代tuple中的所有元素。
Given the rich nature of the Python container types, the for loop is quite powerful.
由于Python容器类型的丰富特性,for循环非常强大。
应用推荐