阅读背景:

一入python深似海--while-loop与for-loop

来源:互联网 

while loops

定义与实例

i = 0
numbers = []

while i < 6:
    print "At the top i is %d" % i
    numbers.append(i)

    i = i + 1
    print "Numbers now: ", numbers
    print "At the bottom i is %d" % i


print "The numbers: "

for num in numbers:
    print num,i = 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: