You can place a print statement within the loop to verify that data indeed exists at each element in the foreach loop.
可以在循环中放一个print语句,检验在foreach循环中每个元素中是否确实存在数据。
The outer collect loop iterates over these reservation groups, and the inner collect loop iterates over the servers contained within each restrain group.
外部的collect循环遍历这些保留组,而内部的collect循环遍历每个限制组中的服务器。
This example USES two for loops. The outer for loop takes care of each row in The Times table, and the nested for loop takes care of the columns within each row.
本例使用两个for循环,外面的for循环关注乘法表中的每一行,嵌套的for循环关注每行内的列。
应用推荐