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
- A Memory from the Past Keeps Pulling Me Back April 7, 2026
- Defenders First April 7, 2026
- Shallow End, Deep Time April 7, 2026