84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
认证高级PHP讲师
x 的初始值要設為 0 不是 1, 否則最後一圈的時候 x 值會是 n, this index is out of range
x
n
Use for i in range(n) 時, 我們直接使用 i 做為 loop variable 即可, 不必另外使用一個變數 x
for i in range(n)
i
Questions I answered: Python-QA
x
的初始值要設為 0 不是 1, 否則最後一圈的時候x
值會是n
, this index is out of rangeUse
for i in range(n)
時, 我們直接使用i
做為 loop variable 即可, 不必另外使用一個變數x
Questions I answered: Python-QA