-3
이 while 루프를 함수로 변환하면 여러 번 호출 할 수 있습니다.while 루프를 함수로 변환
i = 0
numbers = []
while i < 6:
print "At the top of 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
이것은 실제로 매우 타당하고 흥미로운 질문입니다. 문맥에서 아닙니다 OP는 요구했다, 그러나 동적 인 부호 창조를 위해. – Nav