for能对一些东西的集合进行循环

while可以对任何对象进行循环

可以for尽量for 更容易些

做了课后练习1,2,3,4综合代码,缩进成问题啊,贴python缩进怎么办? # -*- coding:utf-8 -*-“””while i < 6:print “At the top i is %d” % inumbers.append(i)i = i + 1print “Numbers now:”, numbersprint “At the bottom i is %d” % i”””numbers = []def jia(j,n):j += nreturn jdef ijia(ijia):i = 0while i < ijia:print”At the top i is %d”% inumbers.append(i)i = jia(i,3)print”Numbers now:”, numbersprint”At the bottom i is %d”% iijia = ijia(50)print “The numbers:”for num in numbers:print num