📜  嵌套循环的目的是什么? - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:20.994000             🧑  作者: Mango

代码示例1
What is the purpose of a nested loop? 

Nested loops are useful when for each pass through the outer loop, you need to repeat some action on the data in the outer loop. For example, you read a file line by line and for each line you must count how many times the word “the” is found.