for i in range(0, 6):
print "Adding %d to the list." % i
# append is a function that lists understand
elements.append(i)
# now we can print them out too
for i in elements:
print "Element was: %d" % i
So, when I print this out, it doesn't print out 6, even though the range is 0 to 6. Why not?
quick question about append and loops
02
Oct