While Loop in Python
September 11, 2020
n = 0
numbers = []
while n < 6:
print "At the top, n is %d" % n
numbers.append(n)
n = n + 1
print "Numbers now: ", numbers
print "At the bottom, n is %d" % n
print "The numbers: "
for num in numbers:
print num
Recent Entries
- Wonder 2 Finally Shows Some Restraint January 25, 2026
- Forty-Five Bugs Hiding in Plain Sight January 23, 2026
- Cleaning the Metadata January 21, 2026