You can also use indices less than zero, which then count backward from the end of the list. So the final statement of the previous example could also be written like so.
您还可以使用小于0的索引,这些索引从列表的末尾往前算。
You actually know whether the number is prime or not, immediately after the end of the for loop, even though you don't use the determined value until the if statement.
在for 循环结束之后,就已经知道数字是否是素数,尽管在 if 语句之前并不使用判断结果。
You actually know whether the number is prime or not, immediately after the end of the for loop, even though you don't use the determined value until the if statement.
在for 循环结束之后,就已经知道数字是否是素数,尽管在 if 语句之前并不使用判断结果。
应用推荐