A for loop repeats some lines a given number of times. for i in range(4): repeats four times the lines written under it, moved four spaces to the right. Those lines form the loop’s block: the lines that are indented the same way under a line that ends with a colon.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 For loop and block?
又称: for loop · block