#!/usr/bin/env python
#
# Show list of integer numbers.
# Yotam Medini  yotam.medini@gmail.com [2010/May/07]

import sys


# Print list of integers WITHOUT using "%s" for list.
def ilist_show(ints):
    sys.stdout.write("[")
    sep = ""
    i = 0
    while i < len(ints):
        sys.stdout.write("%s%d" % (sep, ints[i]))
        sep = ", "
        i += 1
    sys.stdout.write("]\n")


# Define some lists
one_to_ten = range(1, 11)
primes = [2, 3, 5, 7, 11, 13, 17, 19]
squares = [0, 1, 4, 9, 16, 25, 36, 49]

# Show them
sys.stdout.write("One to Ten: ")
ilist_show(one_to_ten)

sys.stdout.write("Primes: ")
ilist_show(primes)

sys.stdout.write("Squares: ")
ilist_show(squares)

sys.exit(0)
