Demonstrates the range() function
print "Counting:"
for i in range(10):
print i,
print "\n\nCounting by fives:"
for i in range(0, 50, 5):
print i,
print "\n\nCounting backwards:"
for i in range(10, 0, -1):
print i,
Related examples in the same category